/* =============================================
   牵手婚恋 — 员工/管理员工作台附加样式
   ============================================= */

/* ========== 更新日志弹窗 ========== */
.changelog-modal { max-height: 98vh; width: 700px; max-width: 94vw; }
.changelog-modal .follow-modal-body { max-height: 92vh; overflow-y: auto; padding: 28px 32px; }
.changelog-modal .changelog-section { margin-bottom: 18px; }
.changelog-modal .changelog-section:last-child { margin-bottom: 0; }
.changelog-modal .changelog-section-title {
  font-size: 14px; font-weight: 600; color: #ff6b9d; margin-bottom: 8px;
  display: flex; align-items: center;
}
.changelog-modal .changelog-section-title .title-line {
  flex: 1; height: 1px; background: linear-gradient(90deg, #ffd1dc, transparent);
}
.changelog-modal .changelog-field { margin-bottom: 12px; }
.changelog-modal .changelog-field:last-child { margin-bottom: 0; }
.changelog-modal .changelog-field label {
  display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 4px;
}
.changelog-modal .changelog-field input,
.changelog-modal .changelog-field textarea,
.changelog-modal .changelog-field select {
  width: 100%; padding: 10px 12px; border: 1.5px solid #ffc0cd; border-radius: 10px;
  font-size: 14px; background: #fffef7; outline: none; transition: border-color 0.2s;
  box-sizing: border-box;
}
.changelog-modal .changelog-field input:focus,
.changelog-modal .changelog-field textarea:focus,
.changelog-modal .changelog-field select:focus {
  border-color: #ff6f91; box-shadow: 0 0 0 3px rgba(255, 111, 145, 0.15);
}
.changelog-modal .changelog-field textarea { min-height: 80px; resize: vertical; }
.changelog-modal .changelog-field input[readonly] { background: #f5f5f5; color: #888; cursor: not-allowed; }
.changelog-item-card {
  background: #f9f9f9; padding: 14px; border-radius: 10px; margin-bottom: 10px;
  position: relative; border-left: 3px solid #ffb6c1;
}
.changelog-item-card select {
  width: 100%; padding: 8px 10px; border: 1.5px solid #ffc0cd; border-radius: 8px;
  font-size: 13px; background: #fff; outline: none; margin-bottom: 8px; box-sizing: border-box;
}
.changelog-item-card select:focus { border-color: #ff6f91; }
.changelog-item-card textarea {
  width: 100%; padding: 6px 10px; border: 1.5px solid #ffc0cd; border-radius: 8px;
  font-size: 13px; min-height: 36px; resize: vertical; outline: none; box-sizing: border-box;
}
.changelog-item-card textarea:focus { border-color: #ff6f91; }
.changelog-add-btn {
  background: linear-gradient(90deg, #9c89ff, #7b6bff); color: #fff; border: none;
  border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: opacity 0.2s;
}
.changelog-add-btn:hover { opacity: 0.9; }
.changelog-submit-btn {
  width: 100%; background: linear-gradient(90deg, #ff7b9c, #ff6b9d); color: #fff;
  border: none; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s;
  box-shadow: 0 4px 12px rgba(255, 111, 145, 0.3);
}
.changelog-submit-btn:hover { opacity: 0.9; }
.changelog-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.changelog-remove-btn {
  position: absolute; top: 8px; right: 8px; background: #ff6b6b; color: #fff;
  border: none; border-radius: 50%; width: 26px; height: 26px; cursor: pointer;
  font-size: 15px; line-height: 26px; text-align: center; padding: 0; transition: opacity 0.2s;
}
.changelog-remove-btn:hover { opacity: 0.85; }
.changelog-info-banner {
  background: linear-gradient(135deg, #e6f7ff, #f0faff); color: #1890ff;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13px;
  border-left: 4px solid #1890ff;
}
.changelog-msg { text-align: center; font-size: 13px; margin-top: 10px; min-height: 20px; }

/* =============================================
   桌面端侧边栏（≥1024px）
   ============================================= */
@media (min-width: 1024px) {

  .profile-page {
    display: flex;
    max-width: none;
    padding: 0;
    gap: 0;
    background-color: #fff;
  }

  /* ===== 侧边栏 ===== */
  .profile-sidebar {
    width: 220px;
    min-height: 100vh;
    background: #1e2a3a;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: width 0.25s ease;
    flex-shrink: 0;
  }
  .sidebar-toggle {
    position: absolute;
    top: 14px;
    right: -36px;
    width: 34px;
    height: 34px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    padding: 0;
    transition: transform 0.25s ease, background 0.2s;
  }
  .sidebar-toggle:hover {
    background: #f1f5f9;
  }
  .sidebar-toggle svg {
    fill: #475569;
    width: 18px;
    height: 18px;
    transform: rotate(180deg);
    transform-origin: center;
    transition: transform 0.25s ease;
    display: block;
  }

  /* ===== 用户信息区 ===== */
  .profile-header-staff {
    flex-direction: column;
    text-align: center;
    padding: 28px 16px 20px;
    border-bottom: 1px solid #334155;
  }
  .profile-header-staff .profile-avatar {
    width: 64px;
    height: 64px;
    font-size: 26px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
  }
  .profile-header-staff .header-staff-name {
    font-size: 16px;
    color: #f1f5f9;
  }
  .profile-header-staff .header-staff-meta {
    font-size: 12px;
    color: #94a3b8;
  }
  .profile-header-staff .header-staff-actions {
    margin-top: 10px;
  }
  .profile-header-staff .header-staff-btn {
    padding: 4px 14px;
    font-size: 12px;
    border-radius: 12px;
    border: 1px solid #475569;
    color: #cbd5e1;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s;
  }
  .profile-header-staff .header-staff-btn:hover {
    background: #334155;
  }

  /* ===== Tab 纵向导航 ===== */
  .profile-tabs {
    flex-direction: column;
    flex: 1;
    padding: 4px 0;
    background: transparent;
    border-bottom: none;
    overflow: visible;
  }
  .profile-tab {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    padding: 9px 12px;
    margin: 1px 12px 1px 45px;
    border-radius: 6px;
    color: #cbd5e1;
    border-bottom: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
  }
  .profile-tab:hover {
    background: #334155;
    color: #f1f5f9;
  }
  .profile-tab.active {
    background: #475569;
    color: #fff;
    border-left: none;
  }
  .profile-tab .tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  .profile-tab .tab-icon svg {
    width: 20px;
    height: 20px;
    display: block;
  }
  .profile-tab .tab-label {
    line-height: 1;
    margin-top: 0;
  }

  /* ===== 分组分隔线 ===== */
  .profile-tab-divider {
    height: 0;
    margin: 6px 16px;
    border-top: 1px solid #334155;
    pointer-events: none;
  }

  /* ===== 底部用户操作 ===== */
  .sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid #334155;
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  .sidebar-footer span {
    cursor: pointer;
    transition: color 0.2s;
  }
  .sidebar-footer span:hover {
    color: #f1f5f9;
  }

  /* ===== 主内容区 ===== */
  .profile-main {
    flex: 1;
    min-width: 0;
    padding: 24px 32px;
    overflow-y: auto;
    max-height: 100vh;
    background: #f0f2f5;
  }
  .info-card {
    margin: 0 0 18px 0;
  }
  .stats-grid {
    padding: 0 0 16px 0;
  }
  .profile-header-staff .header-staff-actions.desktop-only {
    display: block;
  }

  /* ===== 折叠状态 ===== */
  .profile-sidebar.collapsed {
    width: 64px;
  }
  .profile-sidebar.collapsed .tab-label,
  .profile-sidebar.collapsed .tab-label-wrap {
    display: none;
  }
  .profile-sidebar.collapsed .profile-tab {
    justify-content: center;
    padding: 8px 0;
    margin-left: 12px;
    position: relative;
    z-index: 10;
  }
  .profile-sidebar.collapsed .profile-header-staff,
  .profile-sidebar.collapsed .sidebar-footer {
    display: none;
  }
  .profile-sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(0deg);
    transform-origin: center;
  }
  .profile-sidebar.collapsed .sidebar-toggle {
    right: -36px;
  }

  /* 折叠态 tooltip */
  .profile-sidebar.collapsed .profile-tab:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 16px;
    padding: 6px 12px;
    background: #1e293b;
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 6px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  }
}

/* 移动端隐藏 sidebar（仅员工/红娘控制台侧边栏；
   会员个人中心侧边栏含粉色头像区与 Tab 栏，移动端需保留展示） */
@media (max-width: 767px) {
  .profile-sidebar:has(.sidebar-toggle) {
    display: none;
  }
}

/* ===== 帮助问号图标 ===== */
.help-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  color: #c0c4cc;
  transition: color 0.2s;
  margin-left: 3px;
}
.help-icon:hover { color: #909399; }

.help-icon::after {
  content: attr(data-tip);
  display: none;
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 7px 12px;
  background: #fff;
  color: #606266;
  font-size: 13px;
  white-space: nowrap;
  border-radius: 6px;
  z-index: 50;
  pointer-events: none;
  line-height: 1.5;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  font-weight: 400;
  letter-spacing: 0.3px;
  border: 1px solid #e4e7ed;
}

/* tooltip 左侧小箭头 */
.help-icon::before {
  content: '';
  display: none;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-right-color: #e4e7ed;
  z-index: 51;
  pointer-events: none;
}

/* 箭头内部白色覆盖层，制造白底效果 */
.help-icon:hover::before {
  display: block;
}
.help-icon:hover::before {
  border-right-color: #fff;
  filter: drop-shadow(-1px 0 1px rgba(0,0,0,0.05));
}

.help-icon:hover::after,
.help-icon:hover::before {
  display: block;
}


/* ===== 头像更换 ===== */
.drawer-avatar-row {
  text-align: center;
  margin-bottom: 20px;
}

.drawer-avatar-wrap {
  position: relative;
  display: inline-block;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.drawer-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.drawer-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 12px;
}

.drawer-avatar-wrap:hover .drawer-avatar-overlay {
  opacity: 1;
}

/* ===== 桌面端抽屉优化 ===== */
@media (min-width: 1024px) {
  .drawer-panel {
    width: 560px;
  }

  .drawer-body {
    padding: 16px 24px 20px;
  }

  .drawer-section {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .drawer-section-title {
    margin-bottom: 10px;
  }

  .drawer-field {
    margin-bottom: 10px;
  }

  .drawer-field label {
    font-size: 12px;
    margin-bottom: 3px;
  }

  .drawer-field input,
  .drawer-field select {
    padding: 8px 10px;
    font-size: 13px;
  }

  .drawer-row {
    gap: 10px;
    margin-bottom: 10px;
  }

  .drawer-submit-btn {
    margin-top: 4px;
  }
}

/* =============================================
   侧边栏展开/折叠
   ============================================= */
.profile-tab-parent {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.profile-tab-parent .tab-label-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-tab-parent .tab-arrow {
  font-size: 10px;
  color: #94a3b8;
  transition: color 0.2s;
  line-height: 1;
  margin-left: auto;
}
.profile-tab-parent.expanded .tab-arrow {
  color: #cbd5e1;
}
.profile-tab-child {
  padding-left: 16px;
}
.profile-tab-child .profile-tab {
  font-size: 13px;
  padding: 8px 12px 8px 45px;
  margin: 2px 12px 2px 4px;
}
.profile-tab-child .profile-tab:hover {
  background: #334155;
  color: #f1f5f9;
}
.profile-tab-child .profile-tab.active {
  background: #475569;
  color: #fff;
}

/* ===== 负责区域地区选择器（已废弃删除） ===== */

/* =============================================
   修改密码弹窗
   ============================================= */
.password-modal { max-width: 420px; }
.password-modal-body {
  padding: 24px 28px 28px;
}
.password-modal-body .pw-field {
  margin-bottom: 18px;
}
.password-modal-body .pw-field:last-of-type {
  margin-bottom: 22px;
}
.password-modal-body .pw-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}
.password-modal-body .pw-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-modal-body .pw-input-icon {
  position: absolute;
  left: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 1;
  transition: color 0.2s;
}
.password-modal-body .pw-input-wrap:focus-within .pw-input-icon {
  color: var(--color-primary);
}
.password-modal-body .pw-input-wrap input {
  width: 100%;
  padding: 11px 12px 11px 40px;
  border: 1.5px solid var(--color-border-light);
  border-radius: 10px;
  font-size: 14px;
  color: var(--color-text-primary);
  background: var(--color-off-white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}
.password-modal-body .pw-input-wrap input::placeholder {
  color: var(--color-text-disabled);
}
.password-modal-body .pw-input-wrap input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-shadow);
  background: var(--color-white);
}
.password-modal-body .pw-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 5px;
  padding-left: 2px;
}
.password-modal-body .pw-msg {
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s;
}
.password-modal-body .pw-msg-success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.password-modal-body .pw-msg-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.password-modal-body .pw-submit-btn {
  width: 100%;
  display: block;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 14px var(--color-primary-shadow);
}
.password-modal-body .pw-submit-btn:hover {
  opacity: 0.92;
  box-shadow: 0 6px 20px rgba(255, 88, 155, 0.3);
}
.password-modal-body .pw-submit-btn:active {
  transform: scale(0.98);
}
.password-modal-body .pw-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.password-modal-body .pw-modal-header-icon {
  margin-right: 4px;
}

/* =============================================
   私信聊天 - 双栏布局
   ============================================= */
.chat-container {
  display: flex;
  height: calc(100vh - 180px);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  max-width: 960px;
}
.chat-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border, #e5e7eb);
  display: flex;
  flex-direction: column;
  background: #fafbfc;
}
.chat-sidebar-header {
  padding: 10px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.chat-search-wrap {
  position: relative;
}
.chat-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  background: #fff;
}
.chat-search-input:focus {
  border-color: var(--color-primary, #FF589B);
}
.chat-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
}
.chat-search-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  gap: 8px;
  font-size: 13px;
  transition: background 0.15s;
}
.chat-search-item:hover {
  background: var(--color-primary-pale, #FFF5F8);
}
.chat-search-item .search-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg-secondary, #F2F2F7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary, #636366);
  flex-shrink: 0;
}
.chat-search-item .search-name {
  font-weight: 500;
}
.chat-search-item .search-role {
  font-size: 11px;
  color: #999;
  margin-left: auto;
}
.chat-conv-list {
  flex: 1;
  overflow-y: auto;
}
.chat-conv-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
  gap: 10px;
}
.chat-conv-item:hover {
  background: var(--color-primary-pale, #FFF5F8);
}
.chat-conv-item.active {
  background: var(--color-primary-bg, #FFE6ED);
}
.chat-conv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg-secondary, #F2F2F7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-secondary, #636366);
  flex-shrink: 0;
  position: relative;
}
.chat-conv-info {
  flex: 1;
  min-width: 0;
}
.chat-conv-top {
  display: flex;
  align-items: center;
  margin-bottom: 3px;
}
.chat-conv-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.chat-conv-time {
  font-size: 11px;
  color: #9ca3af;
  margin-left: auto;
  flex-shrink: 0;
}
.chat-conv-preview {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-conv-unread {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--color-primary, #FF589B);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  padding: 0 5px;
  display: none;
}
.chat-conv-unread.show {
  display: block;
}
/* 右侧聊天区 */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.chat-default {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}
.chat-default-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.chat-default-text {
  font-size: 16px;
  margin-bottom: 6px;
}
.chat-default-hint {
  font-size: 13px;
  color: #c0c4cc;
}
.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chat-window-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fafbfc;
  flex-shrink: 0;
}
.chat-peer-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.chat-peer-role {
  font-size: 11px;
  color: #999;
  background: var(--color-primary-pale, #FFF5F8);
  padding: 2px 8px;
  border-radius: 10px;
}
.chat-msg-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* 桌面端聊天气泡覆盖：更紧凑的尺寸适配双栏布局 */
.chat-msg-item {
  max-width: 80%;
  margin-bottom: 4px;

}
.chat-msg-item.self {
  align-self: flex-end;
}
.chat-avatar { width: 32px; height: 32px; font-size: 12px; border-radius: 50%; object-fit: cover; }
.chat-conv-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-bubble {
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.5;
}
.chat-msg-item:not(.self) .chat-bubble {
  background: #f0f0f0;
  color: #1f2937;
  border-radius: 14px;
  box-shadow: none;
}
.chat-msg-item:not(.self) .chat-bubble::before { display: none; }
.chat-msg-item.self .chat-bubble {
  border-radius: 14px;
}
.chat-msg-item.self .chat-bubble::before { display: none; }
.chat-time-divider {
  font-size: 11px;
  color: #9ca3af;
  padding: 6px 0;
  margin: 0;
}

/* 桌面端输入栏 */
.chat-input-bar {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--color-border, #e5e7eb);
  gap: 8px;
  background: #fafbfc;
  flex-shrink: 0;
  position: static;
  width: auto;
  height: auto;
}
.chat-input-field {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  font-size: 13px;
  outline: none;
}
.chat-input-field:focus {
  border-color: var(--color-primary, #FF589B);
}
.chat-send-btn {
  padding: 8px 20px;
  background: var(--color-primary, #FF589B);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.chat-send-btn:hover {
  opacity: 0.9;
}
.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.chat-loading {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 13px;
}

/* =============================================
   系统通知
   ============================================= */
.notif-form {
  max-width: 600px;
}
.notif-field {
  margin-bottom: 14px;
}
.notif-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}
.notif-field .required {
  color: #ff6b6b;
}
.notif-input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.notif-input:focus {
  border-color: var(--color-primary, #FF589B);
}
.notif-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}
.notif-textarea:focus {
  border-color: var(--color-primary, #FF589B);
}
.notif-target-wrap {
  position: relative;
}
.notif-all-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
  margin-top: 6px;
  cursor: pointer;
}
.notif-all-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.notif-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 10;
  max-height: 160px;
  overflow-y: auto;
}
.notif-selected {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-primary, #FF589B);
}
.notif-msg {
  text-align: center;
  font-size: 13px;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 10px;
  min-height: 0;
}
.notif-msg.success {
  background: #ecfdf5;
  color: #059669;
}
.notif-msg.error {
  background: #fef2f2;
  color: #dc2626;
}
.notif-submit-btn {
  padding: 10px 48px;
  background: var(--color-primary, #FF589B);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  align-self: center;
  transition: opacity 0.2s;
}
.notif-submit-btn:hover {
  opacity: 0.9;
}
.notif-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.notif-history {
  max-height: 400px;
  overflow-y: auto;
}
.notif-history-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.notif-history-item:last-child {
  border-bottom: none;
}
.notif-history-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.notif-history-time {
  color: #9ca3af;
  font-size: 12px;
}
.notif-history-target {
  color: #666;
}
.notif-history-title {
  font-weight: 600;
  color: #1f2937;
}

/* =============================================
   消息管理
   ============================================= */
.msg-admin-search {
  max-width: 800px;
}
.msg-admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}
.msg-admin-row:last-child {
  margin-bottom: 0;
}
.admin-input {
  padding: 7px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  flex: 1;
  min-width: 120px;
}
.admin-input:focus {
  border-color: var(--color-primary, #FF589B);
}
.admin-select {
  padding: 7px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #fff;
  cursor: pointer;
}
.admin-date-sep {
  color: #9ca3af;
  font-size: 13px;
}
.admin-btn {
  padding: 7px 20px;
  background: var(--color-primary, #FF589B);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.admin-btn:hover {
  opacity: 0.9;
}
.admin-btn-outline {
  background: transparent;
  color: var(--color-primary, #FF589B);
  border: 1.5px solid var(--color-primary, #FF589B);
}
.msg-admin-results {
  max-height: 500px;
  overflow-y: auto;
}
.msg-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.msg-admin-table th {
  background: #f9fafb;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}
.msg-admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  color: #4b5563;
}
.msg-admin-table tr:hover td {
  background: var(--color-primary-pale, #FFF5F8);
}
.msg-admin-preview {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-admin-action {
  color: var(--color-primary, #FF589B);
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
}
.msg-admin-action:hover {
  text-decoration: underline;
}
.msg-admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 12px 0;
  font-size: 13px;
}
.msg-admin-page-btn {
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
  font-size: 12px;
  color: #374151;
}
.msg-admin-page-btn:hover {
  background: var(--color-primary-pale, #FFF5F8);
}
.msg-admin-page-btn.active {
  background: var(--color-primary, #FF589B);
  color: #fff;
  border-color: var(--color-primary, #FF589B);
}
.msg-admin-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 消息详情弹窗 */
.msg-detail-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.msg-detail-modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}
.msg-detail-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}
.msg-detail-row {
  display: flex;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid #f5f5f5;
}
.msg-detail-label {
  width: 80px;
  flex-shrink: 0;
  color: #9ca3af;
}
.msg-detail-value {
  flex: 1;
  color: #1f2937;
  word-break: break-word;
}
.msg-detail-content {
  margin-top: 12px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #1f2937;
  white-space: pre-wrap;
}
.msg-detail-delete {
  margin-top: 16px;
  text-align: right;
}
.msg-detail-delete-btn {
  padding: 6px 16px;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.msg-detail-delete-btn:hover {
  opacity: 0.8;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .chat-container {
    flex-direction: column;
    height: auto;
  }
  .chat-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    max-height: 200px;
  }
  .chat-main {
    min-height: 300px;
  }
}
@media (max-width: 480px) {
  .password-modal-body {
    padding: 20px 18px 24px;
  }
}

/* =============================================
   通知管理 — 并排行
   ============================================= */
.notif-row { display: flex; gap: 16px; align-items: stretch; }
.notif-col-left { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notif-col-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* =============================================
   通知管理 — 快捷标签
   ============================================= */
.notif-target-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: nowrap; }
.notif-tab { padding: 6px 16px; border-radius: 16px; font-size: 13px; cursor: pointer;
  border: 1.5px solid #e5e7eb; color: #666; background: #fff; transition: all 0.2s; }
.notif-tab:hover { border-color: var(--color-primary, #FF589B); color: var(--color-primary); }
.notif-tab.active { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.notif-target-panel { margin-bottom: 14px; }
.notif-select { padding: 7px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px; font-size: 13px; outline: none; }
.notif-hint { font-size: 12px; color: #9ca3af; margin-left: 8px; }

/* =============================================
   通知管理 — 自动规则列表
   ============================================= */
.rule-group { margin-bottom: 16px; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.rule-group-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: #f9fafb; cursor: pointer; font-size: 14px; font-weight: 600; color: #1f2937; }
.rule-group-header:hover { background: #f3f4f6; }
.rule-group-icon { font-size: 10px; transition: transform 0.2s; }
.rule-group-icon.collapsed { transform: rotate(-90deg); }
.rule-group-count { font-weight: 400; color: #9ca3af; font-size: 13px; }
.rule-group-body { padding: 8px 14px 14px; }
.rule-table { width: 100%; border-collapse: collapse; }
.rule-table td { padding: 8px 6px; border-bottom: 1px solid #f3f4f6; font-size: 13px; vertical-align: middle; }
.rule-table tr:last-child td { border-bottom: none; }
.rule-order { width: 50px; text-align: center; white-space: nowrap; }
.rule-order button { border: none; background: none; cursor: pointer; color: #9ca3af; font-size: 14px; padding: 0 4px; }
.rule-order button:hover { color: #374151; }
.rule-title { font-weight: 500; color: #1f2937; }
.rule-status { width: 60px; text-align: center; }
.rule-actions { width: 100px; text-align: right; white-space: nowrap; }
.rule-edit-btn, .rule-del-btn { padding: 4px 12px; border: none; border-radius: 4px; font-size: 12px; cursor: pointer; }
.rule-edit-btn { background: #eef2ff; color: #4f46e5; margin-right: 4px; }
.rule-edit-btn:hover { opacity: 0.8; }
.rule-del-btn { background: #fef2f2; color: #dc2626; }
.rule-del-btn:hover { opacity: 0.8; }
.rule-add-btn { display: inline-block; margin-top: 10px; padding: 6px 16px; border: 1px dashed #d1d5db;
  border-radius: 6px; background: none; font-size: 13px; color: #6b7280; cursor: pointer; }
.rule-add-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* 滑块开关 */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #d1d5db; border-radius: 20px; transition: 0.3s; }
.slider::before { content: ''; position: absolute; height: 14px; width: 14px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: 0.3s; }
.switch input:checked + .slider { background: var(--color-primary, #FF589B); }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* =============================================
   通知管理 — 历史筛选
   ============================================= */
.notif-history-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: nowrap; }
.notif-history-pagination { text-align: center; padding: 12px 0; }
.notif-history-pagination .page-btn { padding: 4px 12px; border: 1px solid #e5e7eb; border-radius: 4px;
  margin: 0 2px; font-size: 13px; cursor: pointer; background: #fff; }
.notif-history-pagination .page-btn:hover { background: #f3f4f6; }
.notif-history-pagination .page-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }



/* 通知管理：左右等高 */
.notif-col-left .info-card,
.notif-col-right .info-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.notif-col-right #autoRuleList {
  flex: 1;
}


/* =============================================
   聊天侧边栏 — 系统通知条目
   ============================================= */
.chat-conv-item.chat-conv-sys {
  background: #f9fafb;
}
.chat-conv-item.chat-conv-sys:hover {
  background: #f3f4f6;
}
.chat-sys-avatar {
  background: linear-gradient(135deg, #01affe, #01cdff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* =============================================
   聊天右侧 — 系统通知面板
   ============================================= */
.chat-notif-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}
.chat-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.chat-notif-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}
.chat-notif-close {
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.chat-notif-close:hover {
  color: #374151;
  background: #f3f4f6;
}
.chat-notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.chat-notif-list .notif-page {
  padding-top: 0;
  min-height: auto;
}
.chat-notif-list .notif-item {
  border-left: none;
  border-right: none;
}
.chat-notif-list .notif-item:first-child {
  border-top: none;
}
.chat-notif-list .notif-item:last-child {
  border-bottom: none;
}

/* 配对时间 meta 中的时分秒（非 00:00 才出现） */
.pair-dt-time {
  font-size: 11px;
  font-weight: 500;
  color: #7c8696;
  margin-left: 4px;
}


/* =============================================
   日志管理 — 统计概览
   ============================================= */
.log-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.log-stat-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  transition: box-shadow 0.2s;
}
.log-stat-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.log-stat-icon {
  font-size: 28px;
  line-height: 1;
}
.log-stat-info {
  display: flex;
  flex-direction: column;
}
.log-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}
.log-stat-label {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

/* =============================================
   日志管理 — 操作入口
   ============================================= */
.log-action-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.log-action-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1.5px solid transparent;
}
.log-action-add {
  background: linear-gradient(135deg, #fef3f5, #ffe8ec);
  border-color: #fecdd6;
}
.log-action-add:hover {
  border-color: var(--color-primary, #FF589B);
  box-shadow: 0 2px 12px rgba(255, 88, 155, 0.15);
}
.log-action-edit {
  background: linear-gradient(135deg, #f0f4ff, #e6edff);
  border-color: #c7d7ff;
}
.log-action-edit:hover {
  border-color: #6b8bff;
  box-shadow: 0 2px 12px rgba(107, 139, 255, 0.15);
}
.log-action-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.log-action-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.log-action-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}
.log-action-desc {
  font-size: 12px;
  color: #6b7280;
}

/* =============================================
   会员管理 — 添加/删除会员操作入口
   ============================================= */
.member-action-row {
  display: flex;
  gap: 12px;
  margin: 0 12px 10px;
}
.member-action-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1.5px solid transparent;
  text-decoration: none;
  color: inherit;
}
.member-action-add {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #bbf7d0;
}
.member-action-add:hover {
  border-color: #22c55e;
  box-shadow: 0 3px 14px rgba(34, 197, 94, 0.2);
  transform: translateY(-1px);
}
.member-action-add .member-action-icon {
  color: #22c55e;
}
.member-action-delete {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-color: #fecaca;
}
.member-action-delete:hover {
  border-color: #ef4444;
  box-shadow: 0 3px 14px rgba(239, 68, 68, 0.2);
  transform: translateY(-1px);
}
.member-action-delete .member-action-icon {
  color: #ef4444;
}
.member-action-resetpwd {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-color: #bfdbfe;
}
.member-action-resetpwd:hover {
  border-color: #3b82f6;
  box-shadow: 0 3px 14px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}
.member-action-resetpwd .member-action-icon {
  color: #3b82f6;
}
.member-action-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.6);
}
.member-action-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.member-action-text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.member-action-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
}
.member-action-desc {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
}

/* =============================================
   会员管理 — 作用域切换
   ============================================= */
.member-scope-bar {
  display: flex;
  gap: 10px;
  margin: 0 0 14px;
}
/* 会员管理标题行内嵌作用域切换：标题左、按钮右 */
.info-card-title-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding-bottom: 9px;
}
/* 会员管理卡片：顶部内边距与标题行下内边距配平，使标题内容在卡片上边缘与标题下边框之间垂直居中 */
.info-card-member {
  padding-top: 10px;
}
.info-card-title-scope .member-scope-inline {
  margin: 0;
}
/* 标题行内作用域按钮：与“搜索”按钮同高，内容垂直居中 */
.info-card-title-scope .member-scope-inline .scope-btn {
  height: 33px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 13px;
  line-height: 1;
}
.info-card-title-scope::before {
  display: none;
}
.scope-btn {
  flex: 0 0 auto;
  padding: 7px 20px;
  border-radius: 20px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
  user-select: none;
  font-family: inherit;
}
.scope-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.scope-btn.active {
  background: var(--color-primary, #FF589B);
  color: #fff;
  border-color: var(--color-primary, #FF589B);
  box-shadow: 0 2px 8px rgba(255, 88, 155, 0.25);
  font-weight: 600;
}
.scope-btn.active:hover {
  background: #e64a87;
  border-color: #e64a87;
}
.info-card-title-scope .member-scope-inline {
  flex-wrap: nowrap;
}
.info-card-title-scope .member-scope-inline .scope-btn {
  white-space: nowrap;
}
@media (max-width: 768px) {
  .info-card-title-scope {
    flex-wrap: wrap;
  }
  .member-scope-bar {
    flex-direction: row;
    gap: 6px;
  }
  .scope-btn {
    text-align: center;
    padding: 7px 12px;
  }
}

/* =============================================
   日志管理 — 最近更新预览
   ============================================= */
.log-preview-list {
  display: flex;
  flex-direction: column;
}
.log-preview-item {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.log-preview-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.log-preview-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.log-preview-version {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary, #FF589B);
}
.log-preview-date {
  font-size: 12px;
  color: #9ca3af;
}
.log-preview-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 8px;
}
.log-preview-updates {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.log-preview-update-item {
  font-size: 12px;
  color: #555;
  background: #f9f9f9;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.5;
}
.log-preview-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}
.tag-added { background: #ff6b9d; color: #fff; }
.tag-improved { background: #7b6bff; color: #fff; }
.tag-fixed { background: #ff5252; color: #fff; }

.log-preview-hidden { display: none; }

/* =============================================
   工作性质 — 自定义分组多选下拉
   ============================================= */
.emp-group { border-bottom: 1px solid #f3f4f6; padding: 4px 0; }
.emp-group:last-child { border-bottom: none; }
.emp-group-header {
  display:flex; align-items:center; gap:6px; padding:6px 12px;
  font-size:13px; font-weight:600; color:#374151; cursor:pointer; background:#f9fafb;
  user-select:none;
}
.emp-group-header:hover { background:#f3f4f6; }
.emp-item {
  display:flex; align-items:center; gap:6px;
  padding:4px 12px 4px 28px; font-size:12px; color:#555; cursor:pointer;
}
.emp-item:hover { background:#f3f4f6; }
.emp-item-limit.emp-item { padding-left: 12px; text-align: left; }
.emp-item-limit.emp-item input { margin-right: 2px; }
.emp-item input, .emp-group-header input { margin:0; cursor:pointer; }

/* =============================================
   通用 hover 下拉
   ============================================= */
.hd-box { position:relative; }
.hd-trigger {
  cursor:pointer; display:flex; justify-content:space-between; align-items:center;
  user-select:none;
}
.hd-trigger:hover { border-color:#FF589B; }
.hd-arrow { font-size:10px; color:#9ca3af; transition:transform 0.2s; }
.hd-panel {
  display:none; position:fixed; z-index:1000;
  background:#fff; border:1px solid #d1d5db; border-radius:8px;
  box-shadow:0 4px 16px rgba(0,0,0,0.12); padding:4px 0;
  min-width:100px; max-height:500px; overflow-y:auto;
  text-align:center;
}
.hd-option {
  padding:6px 14px; font-size:13px; color:#555; cursor:pointer; white-space:nowrap;
  transition:background 0.15s;
}
/* 工作性质组件触发器在 filter 区域内匹配筛选框样式 */
.filter-field .hd-trigger {
  padding: 7px 10px !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  color: #374151 !important;
  height: 33px !important;
  min-height: 33px !important;
}
.hd-option:hover { background:#fef2f6; color:#FF589B; }
.hd-option.active { background:#fef2f6; color:#FF589B; font-weight:600; }

/* 跟进情况/跟进内容：下拉 + 自由输入组合框（.hd-panel 固定定位需改为绝对定位于输入框下方） */
.follow-combo {
  position: relative;
  flex: 1;
  min-width: 0;
}
/* 右侧下拉箭头指示（CSS 三角形，仅视觉，不可点击） */
.follow-combo::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #9ca3af;
  pointer-events: none;
}
.follow-combo .follow-combo-input {
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding-right: 30px;
}
.follow-combo .hd-panel.follow-combo-panel {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  width: 100%;
  min-width: 0;
  z-index: 1001;
  text-align: left;
  box-sizing: border-box;
}
.follow-combo .hd-panel.follow-combo-panel.active { display: block; }
.follow-combo .hd-panel.follow-combo-panel .hd-option { text-align: center; }

/* 高度/年龄面板用网格（与年龄面板风格一致）
   注意：不在此处设置 display:grid，否则会覆盖 .hd-panel 的 display:none，
   导致面板默认可见、悬浮遮挡内容。可见性统一由 JS 内联 display 控制。 */
.hd-panel-grid {
  grid-template-columns:repeat(5,1fr); gap:2px; padding:6px 8px; width:240px;
}
.hd-panel-grid .hd-option {
  display:flex; align-items:center; justify-content:center;
  padding:4px 0; font-size:12px; color:#555; cursor:pointer; border-radius:4px;
  transition:background 0.15s;
}
.hd-panel-grid .hd-option:hover {
  background: #e0f2fe; color: #0369a1;
}
.hd-panel-grid .hd-option.active {
  background: #FF589B; color: #fff; font-weight: 600;
}

/* =============================================
   会员筛选面板
   ============================================= */
.filter-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px 12px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding-bottom: 10px;
  margin: -4px 0 4px;
  border-bottom: 1px dashed #eef0f3;
}
.filter-panel-head-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.filter-panel-arrow {
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.2s;
}
.filter-panel.collapsed .filter-panel-arrow {
  transform: rotate(-90deg);
}
.filter-panel.collapsed > :not(.filter-panel-head) {
  display: none !important;
}
/* 覆盖 profile.css 中 .filter-panel.collapsed{display:none}（会把整块含表头一起隐藏），
   会员筛选折叠时保留"筛选条件"表头可点开 */
#member-advanced-filter.collapsed {
  display: block !important;
}
.filter-keyword-wrap {
  margin-bottom: 12px;
}
.filter-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 4px;
  line-height: 1.2;
  text-align: left;
}
.filter-input,
.filter-select {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-input:focus,
.filter-select:focus {
  border-color: #FF589B;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}
.filter-search-input {
  width: 100%;
  height: 33px;
  padding: 7px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-search-input:focus {
  border-color: #FF589B;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}
.filter-search-input::placeholder {
  font-size: 12px;
  color: #9ca3af;
}
/* 排除已配对：动态搜索下拉 + 选中标签卡片 */
.paired-exclude-wrap { position: relative; width: 100%; }
.member-search-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  z-index: 1300; max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.member-search-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  cursor: pointer; border-bottom: 1px solid #f3f4f6;
}
.member-search-row:hover { background: #dbeafe; }
.member-search-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.member-search-name { font-size: 13px; font-weight: 600; color: #1f2937; }
.member-search-no { font-size: 11px; color: #9ca3af; }
.member-search-meta { margin-left: auto; font-size: 12px; color: #6b7280; }
.paired-chip {
  display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box;
  height: 33px; padding: 0 8px; border: 1.5px solid #d1d5db; border-radius: 8px;
  background: #fff;
}
.paired-chip-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.paired-chip-text { flex: 1; font-size: 12px; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paired-chip-clear { cursor: pointer; color: #9ca3af; font-size: 16px; line-height: 1; padding: 0 4px; }
.paired-chip-clear:hover { color: #e11d48; }
.filter-select-narrow {
  width: 100%;
  flex: 1;
  min-width: 0;
  padding: 7px 6px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  box-sizing: border-box;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: none; -webkit-appearance: none; appearance: none;
}
.filter-select-narrow:focus {
  border-color: #FF589B;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}
.filter-range {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}
.filter-field-w160 { padding: 0; }
.filter-range-sep {
  color: #c0c4cc;
  font-size: 13px;
  flex-shrink: 0;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.filter-field { flex-shrink: 0; width: 95px; }
.filter-field-sort { width: 110px; }
/* 统一筛选区域内所有控件的高度 */
.filter-field select,
.filter-field .hd-trigger,
.filter-field .sort-select,
.filter-field .region-selector-hd .hd-trigger.region-trigger {
  min-height: 30px;
  padding: 7px 10px !important;
  box-sizing: border-box;
  font-size: 13px !important;
}
.filter-field select:hover,
.filter-field .sort-select:hover,
.filter-field-sort .sort-select:hover {
  border-color: #FF589B;
  border-width: 1.5px;
}
.filter-field-w160 { width: 160px; padding: 0; }
.filter-field-w170 { width: 170px; }

/* =============================================
   会员搜索区：多行网格布局（每行 15 列）
   仅作用于会员筛选面板，不影响其它 filter-row
   ============================================= */
#member-advanced-filter .filter-row {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
#member-advanced-filter .filter-row .filter-field {
  width: auto;
  min-width: 0;
}
#member-advanced-filter .filter-row .filter-field.span2 {
  grid-column: span 2;
}
/* 内部控件铺满所在单元格 */
#member-advanced-filter .filter-row .filter-field select,
#member-advanced-filter .filter-row .filter-field .hd-trigger,
#member-advanced-filter .filter-row .filter-field .filter-search-input,
#member-advanced-filter .filter-row .filter-field .region-selector-hd,
#member-advanced-filter .filter-row .filter-field .filter-range,
#member-advanced-filter .filter-row .filter-field .paired-exclude-wrap {
  width: 100%;
  box-sizing: border-box;
}
#member-advanced-filter .filter-row .filter-btn-inline {
  grid-column: span 2;
}
/* 当前筛选结果数（区别于作用域总数） */
.filter-result-count {
  padding: 2px 2px 10px;
  font-size: 12px;
  color: #94a3b8;
}
/* 会员筛选「工作地」：触发器与其它筛选控件（.filter-select）保持一致的边框/高度/字号 */
#member-advanced-filter .region-selector-hd .hd-trigger.region-trigger {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  height: 36px;
  min-height: 0;
  padding: 0 10px;
  font-size: 13px;
}
#member-advanced-filter .region-selector-hd .region-trigger:hover {
  border-color: #FF589B;
}
.age-cell.all-label {
  font-weight: 500;
  color: #6b7280;
}
/* 饼图网格 */
.pie-charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 0;
}
.pie-chart-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}
.pie-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.pie-chart-canvas-wrap {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}
.chart-empty {
  display: none;
  align-items: center;
  justify-content: center;
  height: 230px;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 500;
}
.pie-chart-note {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  line-height: 1.4;
}
.filter-btn-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}
/* 行内操作按钮（与筛选字段同一行） */
.filter-btn-inline {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-shrink: 0;
  padding-bottom: 1px;
}
.filter-search-btn {
  width: 130px;
  padding: 7px 22px;
  background: #FF589B;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.filter-search-btn:hover {
  background: #15803d;
}
.filter-search-btn:active {
  transform: scale(0.97);
}
/* 宣传推广批量栏按钮：初始背景与“搜索”翻页当前页数字一致（#FF589B） */
#promo-batch-bar .filter-search-btn {
  box-sizing: border-box;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  min-width: 120px;
  padding: 9px 16px;
  width: auto;
  letter-spacing: 0.5px;
  background: #FF589B;
  color: #fff;
  border: 1px solid #FF589B;
  box-shadow: 0 3px 10px rgba(255, 88, 155, 0.30);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
#promo-batch-bar .filter-search-btn:hover {
  background: #e34a85;
  border-color: #e34a85;
  box-shadow: 0 6px 16px rgba(255, 88, 155, 0.40);
  transform: translateY(-1px);
}
#promo-batch-bar .filter-search-btn:active {
  transform: translateY(0) scale(0.98);
}
/* 宣传推广批量栏：桌面端正常文档流布局 */
#promo-batch-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
}
/* 桌面端：批量栏内部分组容器以行内方式参与 flex 布局 */
#promo-batch-bar .promo-batch-top,
#promo-batch-bar .promo-batch-actions {
  display: contents;
}
#promo-batch-bar .promo-btn-secondary {
  background: #fff;
  color: #e34a85;
  border: 1px solid #FF589B;
  box-shadow: none;
}
#promo-batch-bar .promo-btn-secondary:hover {
  background: #fff5f8;
  border-color: #e34a85;
  color: #e34a85;
  box-shadow: none;
  transform: translateY(-1px);
}
.filter-reset-btn {
  width: 130px;
  padding: 7px 18px;
  background: #fff;
  color: #6b7280;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.filter-reset-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* =============================================
   服务管理子 Tab
   ============================================= */
.service-subtab-nav {
  display: flex;
  gap: 2px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 14px;
}
.service-subtab-nav .sub-tab {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.service-subtab-nav .sub-tab:hover { color: #374151; background: rgba(255,255,255,0.5); }
.service-subtab-nav .sub-tab.active {
  background: #fff;
  color: #FF589B;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.service-subtab { display: none; }
.service-subtab.active { display: block; }

.service-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.service-toolbar .service-search {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 200px;
}
.service-toolbar .service-search input {
  flex: 1;
  padding: 6px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  min-width: 0;
}
.service-toolbar .service-search input:focus { border-color: #FF589B; }
.service-toolbar .service-search button {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: #FF589B;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}
.service-toolbar .service-filter select {
  padding: 6px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.service-toolbar .service-filter select:focus { border-color: #FF589B; }
.service-toolbar-title { font-size: 15px; font-weight: 600; color: #1f2937; flex:1; }
.service-toolbar .btn-add-log {
  padding: 8px 20px; border: none; border-radius: 8px;
  background: #FF589B; color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap; transition: background 0.15s;
}
.service-toolbar .btn-add-log:hover { background: #E84D8A; }

.service-table-wrap {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #f1e4e8;
  overflow-x: auto;
}
.service-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.service-table th {
  background: #fef9fb;
  color: #374151;
  font-weight: 600;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid #f1e4e8;
  white-space: nowrap;
}
/* 台账表头排序小箭头：加粗加大、更清晰 */
.ledger-sort-arrow {
  display: inline-block;
  margin-left: 3px;
  font-size: 13px;
  line-height: 1;
  vertical-align: middle;
  transform: translateY(-1px);
  font-weight: 700;
  color: #94a3b8;
}
.ledger-sort-arrow.up,
.ledger-sort-arrow.down {
  color: #FF589B;
  font-weight: 800;
}
.ledger-sort-arrow.idle {
  color: #9aa2b0;
}
.service-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f3f0f0;
  color: #374151;
  vertical-align: middle;
}
.service-table tr:hover td { background: #fef9fb; }
.service-table .col-note {
  max-width: 200px;
  word-break: break-word;
  white-space: pre-wrap;
}
.service-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
.service-pagination button {
  padding: 5px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
}
.service-pagination button:hover { background: #f3f4f6; }
.service-pagination button.active {
  background: #FF589B;
  color: #fff;
  border-color: #FF589B;
}
.service-pagination button:disabled { opacity: 0.4; cursor: default; }
.service-pagination .page-info { font-size: 14px; color: #374151; }

/* =============================================
   服务日志 — 移动端卡片视图（≤767px 时由 JS 渲染）
   ============================================= */
.svclog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.svclog-item {
  background: #fff;
  border: 1px solid #f1e4e8;
  border-radius: 10px;
  padding: 9px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.svclog-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.svclog-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.svclog-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.6;
  flex-shrink: 0;
}
.svclog-tag-1 { background: #e0f2fe; color: #0369a1; }
.svclog-tag-2 { background: #e0f2fe; color: #0369a1; }
.svclog-tag-3 { background: #fce7f3; color: #9d174d; }
.svclog-tag-4 { background: #fef3c7; color: #92400e; }
.svclog-tag-5 { background: #fee2e2; color: #b91c1c; }
.svclog-tag-6 { background: #ede9fe; color: #6d28d9; }
.svclog-tag-7 { background: #ecfdf5; color: #065f46; }
.svclog-tag-8 { background: #f3f4f6; color: #6b7280; }
.svclog-tag-9 { background: #dbeafe; color: #1e40af; }
.svclog-date {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
  flex-shrink: 0;
}
.svclog-member {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svclog-no {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 0 5px;
  line-height: 1.6;
  flex-shrink: 0;
}
.svclog-summary {
  margin-top: 5px;
  font-size: 12.5px;
  color: #4b5563;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}
.svclog-op {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 移动端：服务工具栏 / 分页 自适应（搜索独占一行，筛选与添加按钮并排） */
@media (max-width: 767px) {
  .service-toolbar { gap: 8px; }
  .service-toolbar .service-search { min-width: 0; flex: 1 1 100%; }
  .service-toolbar .service-search input { padding: 8px 12px; font-size: 14px; }
  .service-toolbar .service-search button { padding: 8px 14px; font-size: 14px; }
  .service-toolbar .service-filter select { padding: 8px 12px; font-size: 14px; flex: 1 1 auto; min-width: 0; }
  .service-toolbar .btn-add-log { flex: 1 1 auto; padding: 9px 12px; font-size: 14px; text-align: center; }
  .service-toolbar .btn-sm { flex: 1 1 auto; padding: 8px 12px; font-size: 13px; text-align: center; }
  .service-pagination { flex-wrap: wrap; gap: 6px; }
  .service-pagination button { padding: 6px 10px; font-size: 13px; }
}

/* 订单管理：移动端卡片视图（替代超宽表格，仅 isMobileView 渲染） */
.ord-list { display: flex; flex-direction: column; gap: 10px; }
.ord-card {
  background: #fff;
  border: 1px solid #f1e4e8;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ord-card.ord-overdue { border-color: #fca5a5; }
.ord-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.ord-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ord-card-title.ord-card-mono { font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ord-card-sub { font-size: 12px; color: #9ca3af; font-weight: 500; margin-left: 6px; }
.ord-grid { display: flex; flex-direction: column; }
.ord-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed #f1f5f9;
  font-size: 13px;
}
.ord-row:last-child { border-bottom: none; }
.ord-label { color: #94a3b8; flex-shrink: 0; }
.ord-val { color: #334155; text-align: right; min-width: 0; word-break: break-word; }
.ord-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.ord-card-actions .btn-sm { flex: 1 1 auto; }
.ord-btn-danger { color: #dc2626; }
.ord-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.ord-tag-green { background: #d9f2e3; color: #1e7a4d; }
.ord-tag-red { background: #fee2e2; color: #b91c1c; }
.ord-tag-gray { background: #f3f4f6; color: #6b7280; }
.ord-tag-blue { background: #e0f2fe; color: #0369a1; }

.btn-sm {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: #FF589B; color: #fff; }
.btn-primary:hover { background: #e94e8a; }
.btn-outline { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.btn-outline:hover { background: #f3f4f6; }
.btn-sm i { margin-right: 3px; }
.tag-status-1 { background: #fef3c7; color: #92400e; }
.tag-status-2 { background: #d1fae5; color: #065f46; }
.tag-status-3 { background: #f3f4f6; color: #6b7280; }
.tag-status-4 { background: #fce7f3; color: #9d174d; }

/* =============================================
   宣传推广 — 视图切换 + 征婚资料卡片
   ============================================= */

/* 视图切换 Tab */
.member-view-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border-bottom: 2px solid #f1e4e8;
}
.member-view-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  user-select: none;
}
.member-view-tab:hover { color: #FF589B; }
.member-view-tab.active {
  color: #FF589B;
  border-bottom-color: #FF589B;
}

/* ===== 会员列表（网格/表格布局） ===== */
.member-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0,auto)) minmax(0,160px) minmax(0,auto) minmax(0,90px) repeat(17, minmax(0,auto)) minmax(170px,auto);
  gap: 6px 12px;
  overflow: hidden;
  min-width: 0;
}
.member-grid.promo-mode {
  grid-template-columns: 32px repeat(8, minmax(0,auto)) minmax(0,160px) minmax(0,auto) minmax(0,90px) repeat(17, minmax(0,auto)) minmax(170px,auto);
}
/* 宣传推广视图：固定下拉面板掠过网格时避免文字合成闪烁 */
.member-grid.promo-mode .member-grid-row {
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}
.cell-check,
.cell-check-header {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 自定义复选框（宣传推广选择样式，参考项目通用 custom-checkbox） */
.cell-check .custom-checkbox,
#promo-batch-bar .custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.cell-check .custom-checkbox input[type="checkbox"],
#promo-batch-bar .custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.cell-check .check-box,
#promo-batch-bar .check-box {
  width: 18px;
  height: 18px;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  background: #fff;
  box-sizing: border-box;
}
.cell-check .custom-checkbox:hover .check-box,
#promo-batch-bar .custom-checkbox:hover .check-box {
  border-color: #FF589B;
}
.cell-check .custom-checkbox input[type="checkbox"]:checked + .check-box,
#promo-batch-bar .custom-checkbox input[type="checkbox"]:checked + .check-box {
  background: #FF589B;
  border-color: #FF589B;
  box-shadow: 0 0 0 3px rgba(255, 88, 155, 0.15);
}
.cell-check .check-icon,
#promo-batch-bar .check-icon {
  width: 10px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  margin-top: -2px;
  transition: transform 0.2s;
}
.cell-check .custom-checkbox input[type="checkbox"]:checked + .check-box .check-icon,
#promo-batch-bar .custom-checkbox input[type="checkbox"]:checked + .check-box .check-icon {
  transform: rotate(-45deg) scale(1);
}
.member-grid-header,
.member-grid-row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: center;
  justify-items: center;
  padding: 2px 12px;
  font-size: 12.5px;
  color: #374151;
  text-align: center;
}
.member-grid-header {
  background: #f9fafb;
  color: #6b7280;
  font-weight: 600;
  font-size: 12px;
  border-radius: 8px;
}
.member-grid-row {
  background: #fff;
  border: 1px solid #f1e4e8;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.member-grid-row:hover { background: #faf5f7; }
.member-grid-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 可排序/筛选表头 */
.sort-header {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 2px 4px;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  line-height: 1.2;
}
.sort-header:hover { color: #1f2937; }
.sort-header.active { color: #e11d48; }
.sort-ind { font-size: 10px; }
/* 多级排序：等级小标（绝对定位在表头右上角，不影响布局） */
.sort-lvl {
  position: absolute;
  top: -3px;
  right: -6px;
  display: inline-block;
  min-width: 12px;
  height: 12px;
  line-height: 12px;
  border-radius: 50%;
  background: #e11d48;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  padding: 0 2px;
}

/* 列筛选弹层 */
.col-filter-popup {
  position: absolute;
  z-index: 1200;
  min-width: 90px;
  background: #fff;
  border: 1px solid #f1e4e8;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  padding: 4px;
}
.col-filter-item {
  padding: 7px 12px;
  font-size: 13px;
  color: #374151;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}
.col-filter-item:hover { background: #faf5f7; }
.col-filter-item.active { color: #e11d48; font-weight: 600; }
.col-filter-divider { height: 1px; background: #f1e4e8; margin: 4px 0; }

/* 是否有照片 */
.cell-photo.has-photo { color: #16a34a; font-weight: 600; }
.cell-photo:not(.has-photo) { color: #9ca3af; }

/* 会员单元格（头像 + 编号） */
.cell-member {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}
.cell-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.cell-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell-no { font-size: 11px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-name { color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 长文本单元格（如单位名称）：允许自动换行
   注：需用比 .member-grid-row > span 更高的优先级覆盖其 white-space:nowrap */
.member-grid-row > span.cell-long {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
  text-align: center;
}

/* 完善度 */
.cell-comp { font-weight: 700; }

/* 操作列（最右侧）：操作按钮分 2 行显示，每行 5 个（第 2 行按实际按钮数排布） */
.cell-actions {
  display: flex;
  gap: 4px;
  row-gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
}
.cell-actions .member-card-action-btn {
  width: auto;
  height: 26px;
  flex: 0 1 calc(20% - 3.2px);
  flex-shrink: 0;
}

/* 窄屏：不出现横向滚动条，列按内容收缩、长文本换行 */
@media (max-width: 1024px) {
  .member-grid { overflow-x: hidden; }
}

/* =============================================
   移动端会员列表（会员管理卡片，替代超宽表格）
   ============================================= */
@media (max-width: 767px) {
  /* 快捷操作卡（添加/删除/重置密码）：移动端紧凑三列，隐藏说明文字 */
  .member-action-row {
    flex-wrap: nowrap;
  }
  .member-action-card {
    flex-direction: column;
    gap: 3px;
    padding: 10px 6px;
    text-align: center;
  }
  .member-action-card .member-action-desc { display: none; }
  .member-action-card .member-action-icon { font-size: 22px; }

  .staff-member-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .staff-member-card {
    background: #fff;
    border: 1px solid #f1e4e8;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .staff-member-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
  }
  .staff-member-head:active { background: #faf5f7; }
  .staff-member-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
  }
  .staff-member-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .staff-member-info { flex: 1; min-width: 0; }
  .staff-member-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .staff-member-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
  }
  .staff-member-no {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.5;
  }
  .staff-badge {
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    padding: 1px 6px;
    line-height: 1.5;
  }
  .staff-badge-ok { background: #dcfce7; color: #16a34a; }
  .staff-badge-warn { background: #fef3c7; color: #d97706; }
  .staff-badge-danger { background: #fee2e2; color: #dc2626; }
  .staff-badge-gray { background: #f1f5f9; color: #64748b; }
  .staff-member-tags {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.6;
    word-break: break-word;
  }
  .staff-member-meta {
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 3px;
    line-height: 1.6;
  }
  .staff-member-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: #faf5f7;
    border-top: 1px solid #f1e4e8;
  }
  .staff-member-actions .mm-member-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 10px;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    justify-content: center;
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0;
    transition: background 0.15s;
    box-sizing: border-box;
  }
  .staff-member-actions .mm-member-action-btn.primary { background: #fce7f3; color: #FF589B; }
  .staff-member-actions .mm-member-action-btn.primary:active { background: #fbcfe8; }
  .staff-member-actions .mm-member-action-btn.outline { background: #fff; color: #475569; border: 1px solid #e5e7eb; }
  .staff-member-actions .mm-member-action-btn.outline:active { background: #f1f5f9; }
  .staff-member-actions .mm-member-action-btn.danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
  .staff-member-actions .mm-member-action-btn.danger:active { background: #fee2e2; }
  .staff-member-actions .mm-member-action-btn:disabled { opacity: .5; pointer-events: none; }
}

/* 征婚资料卡片 */
.promotion-card {
  background: #fff;
  border: 1px solid #f1e4e8;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.promotion-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.promotion-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #faf5f7;
  border-bottom: 1px solid #f1e4e8;
}
.promotion-checkbox-wrap { display: flex; align-items: center; }
.promotion-checkbox-wrap { display: flex; align-items: center; }
.promotion-checkbox-wrap input[type="checkbox"] {
  width: 18px; height: 18px; cursor: pointer; appearance: none; -webkit-appearance: none;
  margin: 0; border: 2px solid #d1d5db; border-radius: 5px; background: #fff;
  transition: all 0.2s ease; position: relative; flex-shrink: 0;
}
.promotion-checkbox-wrap input[type="checkbox"]:hover { border-color: #FF589B; }
.promotion-checkbox-wrap input[type="checkbox"]:checked {
  background: #FF589B; border-color: #FF589B;
}
.promotion-checkbox-wrap input[type="checkbox"]:checked::after {
  content: '✓'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 1;
}
.promotion-card-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.promotion-card-avatar.gender-male { background: linear-gradient(135deg,#667eea,#764ba2); }
.promotion-card-avatar.gender-female { background: linear-gradient(135deg,#f093fb,#f5576c); }
.promotion-card-summary { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.promotion-card-name { font-size: 14px; font-weight: 600; color: #334155; }
.promotion-card-meta { font-size: 12px; color: #94a3b8; }

.promotion-card-body { padding: 12px 14px; }
.promotion-card-intro {
  font-size: 13px;
  line-height: 1.8;
  color: #475569;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  margin: 0;
  padding: 0;
}


/* ==================== 红娘管理（仅管理员） ==================== */
.mm-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.mm-search { flex: 1 1 220px; min-width: 200px; }
.mm-search input {
  width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid #e5e7eb;
  border-radius: 8px; font-size: 13px; background: #fff; color: #334155; outline: none;
  transition: border-color .15s;
}
.mm-search input:focus { border-color: var(--color-primary, #FF589B); }
.mm-filter {
  padding: 9px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px;
  background: #fff; color: #334155; cursor: pointer; outline: none;
}
.mm-filter:focus { border-color: var(--color-primary, #FF589B); }
.mm-add-btn { margin-left: auto; white-space: nowrap; }

.mm-card { margin-bottom: 12px; }
.mm-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px dashed #edf0f4;
}
.mm-card-head-main { min-width: 0; flex: 1; }
.mm-card-head-top { display: flex; align-items: flex-start; gap: 10px; }
.mm-avatar {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 600; flex-shrink: 0;
}
.mm-avatar-male { background: linear-gradient(135deg,#667eea,#764ba2); }
.mm-avatar-female { background: linear-gradient(135deg,#f093fb,#f5576c); }
.mm-card-title-wrap { min-width: 0; flex: 1; }
.mm-card-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mm-card-name { font-size: 15px; font-weight: 700; color: #1f2937; }
.mm-badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.mm-badge-coop { background: #d1fae5; color: #047857; }
.mm-badge-type { background: #ede9fe; color: #6d28d9; }
.mm-card-meta { font-size: 12px; color: #94a3b8; margin-top: 4px; }
/* 代理人卡片：编号/姓名/状态/代理数/手机号·微信号 全部一行展示 */
#agent-list-container .mm-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#agent-list-container .mm-card-meta {
  margin-top: 0;
}

/* 姓名行右侧的竖向分隔线 */
.mm-name-divider {
  width: 1px;
  height: 16px;
  background: #e5e7eb;
  margin: 0 4px 0 2px;
  flex-shrink: 0;
}

/* 与姓名/徽章同一行的详情标签 */
.mm-card-name-row .mm-detail-line {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.mm-card-name-row .mm-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f5f6f8;
  border: 1px solid #eef0f3;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  color: #5a6472;
}

/* 头部操作按钮：右上角，更紧凑 */
.mm-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  flex-shrink: 0;
}
.mm-head-actions .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  box-sizing: border-box;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}
.mm-head-actions .mm-view-members { border-color: var(--color-primary, #FF589B); color: var(--color-primary, #FF589B); }
.mm-head-actions .mm-view-members.active { background: var(--color-primary, #FF589B); color: #fff; }

/* 头部详情标签 */
.mm-detail-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
}
.mm-detail-line .mm-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f5f6f8;
  border: 1px solid #eef0f3;
  border-radius: 20px;
  padding: 4px 11px;
  color: #5a6472;
}
.mm-remark {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  background: #fff8e6;
  border: 1px solid #f5e3b3;
  border-radius: 12px;
  padding: 2px 10px;
  color: #9a6b1a;
  font-size: 11px;
  line-height: 1.4;
  margin: 0;
}

/* 卡身：仅统计区 */
.mm-card-body { padding-top: 14px; }

/* 红娘卡：统计区内联到姓名行右侧（与详情标签同行，节省纵向空间） */
.mm-card-name-row .mm-card-body {
  padding-top: 0;
  margin-left: auto;
  flex-shrink: 0;
}
.mm-card-name-row .mm-stats {
  display: flex;
  gap: 6px;
}
.mm-card-name-row .mm-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
}
.mm-card-name-row .mm-stat-value { font-size: 13px; }
.mm-card-name-row .mm-stat-label { font-size: 11px; margin: 0; }

/* 统计区：三个并排的迷你统计块 */
.mm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.mm-stat {
  text-align: center;
  background: linear-gradient(180deg, #fff7fa, #fff);
  border: 1px solid #f8e2eb;
  border-radius: 12px;
  padding: 14px 10px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.mm-stat:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary, #FF589B);
  box-shadow: 0 4px 12px rgba(255, 88, 155, 0.12);
}
.mm-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary, #FF589B);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.mm-stat-label { font-size: 12px; color: #9aa2b0; margin-top: 6px; }

.mm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.mm-form-grid .follow-form-row { display: block; margin-bottom: 0; }
.mm-form-grid .follow-form-row:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .mm-form-grid { grid-template-columns: 1fr; }
}
.mm-form-grid .follow-label .required, .mm-form-grid .required { color: #ef4444; font-weight: 700; }
/* ==================== 红娘管理：查看引入会员（行内展开，仿配对"历史"） ==================== */
.mm-members-inline {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  border-top: 1px dashed #e2e8f0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  margin-top: 0;
  padding: 0 2px;
}
.mm-members-inline.open {
  max-height: 2000px;
  opacity: 1;
  margin-top: 12px;
  padding-top: 12px;
}
.mm-members-loading {
  text-align: center;
  padding: 20px 0;
  display: none;
}
.mm-members-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid #e5e7eb;
  border-top-color: var(--color-primary, #FF589B);
  border-radius: 50%;
  animation: mmSpin 0.6s linear infinite;
}
@keyframes mmSpin {
  to { transform: rotate(360deg); }
}
.mm-members-content { padding: 0 2px; }
.mm-members-empty { padding: 20px 0; text-align: center; color: #9ca3af; font-size: 13px; }
.mm-inline-pager {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; font-size: 13px; color: #6b7280;
}
.mm-inline-pager button {
  padding: 4px 14px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; color: #374151;
  font-size: 13px; cursor: pointer;
}
.mm-inline-pager button:hover:not(:disabled) { border-color: var(--color-primary, #FF589B); color: var(--color-primary, #FF589B); }
.mm-inline-pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ==================== 代理人管理：紧凑布局（#panel-agents 列表） ==================== */
#agent-list-container .mm-card {
  padding: 14px 16px;
  margin-bottom: 0;
}
#agent-list-container .mm-card-head {
  gap: 10px;
  padding-bottom: 10px;
}
#agent-list-container .mm-avatar {
  width: 36px;
  height: 36px;
  font-size: 15px;
}
#agent-list-container .mm-card-name {
  font-size: 14px;
}
#agent-list-container .mm-card-no {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.4;
}
#agent-list-container .mm-card-meta {
  font-size: 11px;
  margin-top: 3px;
}
#agent-list-container .mm-head-actions {
  gap: 5px;
}
#agent-list-container .mm-head-actions .action-btn {
  font-size: 11px;
  padding: 0 8px;
}
#agent-list-container .mm-remark {
  padding: 2px 10px;
  margin: 0;
  font-size: 11px;
}
#agent-list-container .mm-card-body {
  padding-top: 10px;
}
#agent-list-container .mm-stats {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
#agent-list-container .mm-stat {
  padding: 8px;
  border-radius: 10px;
}
#agent-list-container .mm-stat-value {
  font-size: 18px;
}
#agent-list-container .mm-stat-label {
  font-size: 11px;
  margin-top: 4px;
}
#agent-list-container .mm-members-inline.open {
  margin-top: 8px;
  margin-left: 14px;
  padding-top: 8px;
}
#agent-list-container .member-list-item {
  padding: 8px 10px;
  margin-bottom: 6px;
  gap: 10px;
}
#agent-list-container .member-list-avatar {
  width: 36px;
  height: 36px;
  font-size: 15px;
}
/* 桌面端（≥1024px 侧边栏布局）：单列，每个代理人信息一行 */
@media (min-width: 1024px) {
  #agent-list-container .mm-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 10px 16px;
  }
  #agent-list-container .mm-card-head {
    flex: 1;
    min-width: 0;
    align-items: center;
    padding: 0;
    border-bottom: none;
  }
  #agent-list-container .mm-card-head-top {
    align-items: center;
  }
  #agent-list-container .mm-card-body {
    padding: 0;
    flex-shrink: 0;
  }
  #agent-list-container .mm-stats {
    display: flex;
    gap: 6px;
  }
  #agent-list-container .mm-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
  }
  #agent-list-container .mm-stat-value {
    font-size: 13px;
  }
  #agent-list-container .mm-stat-label {
    font-size: 11px;
    margin: 0;
  }
  #agent-list-container .mm-remark {
    flex-basis: 100%;
    margin: 0;
  }
  #agent-list-container .mm-members-inline {
    flex-basis: 100%;
    border-top: none;
  }
  #agent-list-container .mm-members-inline.open {
    border-top: 1px dashed #e2e8f0;
    margin-top: 6px;
    margin-left: 14px;
    padding-top: 8px;
  }
}

/* ==================== 新增/编辑红娘 弹窗美化 ==================== */
.mm-modal {
  display: flex;
  flex-direction: column;
  max-width: 720px !important;
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
}
.mm-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #fff0f6, #ffe3ee);
  border-bottom: 1px solid #f8d7e4;
  flex-shrink: 0;
}
.mm-modal-header-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(255, 88, 155, 0.15);
}
.mm-modal-header-txt { flex: 1; min-width: 0; }
.mm-modal-title { font-size: 18px; font-weight: 800; color: #1f2937; }
.mm-modal-sub { font-size: 12px; color: #9a6b7d; margin-top: 2px; }
.mm-modal-header .follow-modal-close {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
}
.mm-modal-body {
  padding: 8px 24px 20px;
  overflow-y: auto;
  max-height: calc(90vh - 82px);
}

.mm-form-section { margin-top: 18px; }
.mm-form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--color-primary, #FF589B);
}
.mm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.mm-field { display: flex; flex-direction: column; gap: 6px; }
.mm-field-full { grid-column: 1 / -1; }
.mm-label { font-size: 13px; font-weight: 600; color: #4b5563; }
.mm-label .required { color: #ef4444; font-weight: 700; }
.mm-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mm-input:focus {
  border-color: var(--color-primary, #FF589B);
  box-shadow: 0 0 0 3px rgba(255, 88, 155, 0.12);
}
.mm-input-readonly {
  background: #f5f6f8;
  color: #9ca3af;
  cursor: not-allowed;
}
.mm-textarea { resize: vertical; min-height: 56px; line-height: 1.6; }
.mm-field-hint { font-size: 11px; color: #9ca3af; margin-top: 2px; }

.mm-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 0 0;
  margin-top: 6px;
  border-top: 1px solid #f1f5f9;
}
.mm-save-btn {
  min-width: 96px;
  padding: 9px 22px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600;
}
@media (max-width: 640px) {
  .mm-form-grid { grid-template-columns: 1fr; }
}

/* ===== 宣传推广：生成分享链接弹窗 ===== */
.promo-share-modal {
  width: 560px;
  max-width: 92vw;
}
.promo-share-header {
  padding: 18px 22px;
  border-bottom: 1px solid #f3e0e8;
}
.promo-share-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.promo-share-header .follow-modal-title {
  font-size: 17px;
}
.promo-share-body {
  padding: 22px 24px;
}
.promo-share-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.promo-share-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.promo-share-field-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.promo-share-label {
  font-size: 14px;
  color: #1f2937;
  font-weight: 600;
}
.promo-share-hint {
  font-size: 12px;
  color: #9ca3af;
}
.promo-share-count {
  margin-left: auto;
  font-size: 12px;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}
.promo-share-count.over {
  color: #ef4444;
}
.promo-share-field input[type="text"],
.promo-share-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #fafbfc;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.promo-share-field input[type="text"]:focus,
.promo-share-field textarea:focus {
  border-color: #ff4d7d;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 77, 125, 0.12);
}
.promo-share-field textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.7;
}
.promo-share-msg {
  font-size: 13px;
  color: #dc2626;
  min-height: 18px;
}
.promo-share-footer {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 12px;
}
.promo-share-footer .action-btn {
  padding: 9px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

/* 分页上一页/下一页箭头符号放大 */
.service-pagination .pg-arrow {
  font-size: 16px;
  line-height: 1;
  padding: 2px 8px;
}

/* 列表加载态：保留原内容高度（防塌陷抖动），叠加半透明遮罩（会员列表/订单台账共用） */
#member-list-ajax-container.loading,
#ledger-table-wrap.loading {
  position: relative;
}
#member-list-ajax-container.loading::after,
#ledger-table-wrap.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  color: #9ca3af;
  font-size: 14px;
  z-index: 5;
  border-radius: 8px;
}


/* 生成分享链接弹窗：标题栏可拖动 */
.promo-share-header {
  cursor: move;
  user-select: none;
}

/* ===== 订单/流水 弹窗统一美化 ===== */
.oc-modal { width: 640px !important; max-width: 94vw; }
@media (max-width: 640px) {
  .oc-modal { width: 100% !important; max-width: 100% !important; }
}
.oc-overlay { display: flex; } /* 复用 .follow-modal-overlay.show 亦可 */
/* 弹窗主体更宽松：加宽加高、留白更足 */
.oc-modal .mm-modal-header { padding: 20px 28px; }
.oc-modal .mm-modal-body { padding: 12px 28px 24px; }
.oc-modal .mm-form-section { margin-top: 22px; }
/* 订单/流水弹窗区块标题：去掉粉色竖条与左内边距（emoji 已在 JS 移除） */
.oc-modal .mm-form-section-title {
  padding-left: 0;
  border-left: none;
  font-size: 15px;
  margin-bottom: 16px;
}
.oc-modal .mm-form-grid { gap: 16px 22px; }
.oc-modal .mm-field { gap: 8px; }
.oc-modal .mm-label { font-size: 13px; }
/* 订单/流水弹窗：统一 input/select 高度与字号（与基础 .mm-input 一致 13px） */
.oc-modal .mm-input {
  height: 40px;
  padding: 0 12px;
  font-size: 13px;
}
.oc-modal select.mm-input { line-height: normal; }
/* 会员搜索行的"搜索"按钮与输入框等高对齐 */
.oc-modal .mm-field .btn-sm {
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.oc-modal .mm-modal-footer { padding: 16px 0 4px; justify-content: center; align-items: center; }
.oc-modal .mm-modal-footer .action-btn { margin: 0; }
.oc-modal .mm-save-btn,
.oc-modal .mm-modal-footer .action-btn-outline {
  min-width: 120px;
  padding: 11px 26px !important;
  font-size: 15px !important;
  border-radius: 8px !important;
  font-weight: 600;
}
.oc-member-card {
  display: flex; align-items: center; gap: 12px;
  background: #f8f9fb; border: 1px solid #eef0f3; border-radius: 12px;
  padding: 12px 16px;
}
.oc-member-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FFB6C9, #FF589B); color: #fff;
  font-size: 16px; font-weight: 700;
}
.oc-member-name { font-size: 15px; font-weight: 700; color: #1f2937; }
.oc-member-meta { font-size: 13px; color: #6b7280; margin-top: 3px; }
.oc-search-row {
  padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px;
  margin-bottom: 6px; cursor: pointer; font-size: 14px; background: #fff;
  transition: border-color .15s, background .15s;
}
.oc-search-row:hover { border-color: var(--color-primary, #FF589B); background: #fff5f8; }
.oc-selected { font-size: 13px; color: #059669; margin-top: 6px; font-weight: 600; }
.oc-hint {
  margin-top: 16px; background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 10px; padding: 12px 16px; font-size: 13px; color: #9a3412; line-height: 1.8;
}
.oc-hint-icon { margin-right: 6px; }
/* 新增订单弹窗：购买次数提示（仅单次/按次套餐可见） */
.oc-count-hint { margin-top: 6px; font-size: 12px; color: #9a3412; line-height: 1.6; }
#oc_count_field .mm-input,
#ocn_count_field .mm-input { max-width: 180px; }
/* 添加流水弹窗：类型/金额/支付方式一行三列 */
.oc-form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.oc-form-grid-3 .mm-field-full { grid-column: 1 / -1; }
.oc-form-grid-3 .mm-field-wide { grid-column: span 2; }
@media (max-width: 640px) { .oc-form-grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .oc-form-grid .mm-field { grid-column: 1 / -1; } }

/* ===== 服务子tab 合计条 ===== */
.service-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  background: linear-gradient(135deg, #fff5f8, #fff);
  border: 1px solid #fbe0ea;
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 10px;
}
.svc-summary-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 18px;
  border-right: 1px solid #f6e2ea;
  flex-shrink: 0;
}
.svc-summary-item:last-child { border-right: none; }
.svc-summary-label { font-size: 12px; color: #8a7d84; }
.svc-summary-value { font-size: 16px; font-weight: 700; color: #FF589B; }
.svc-summary-value.svc-summary-danger { color: #dc2626; }
.svc-summary-value.svc-summary-net { color: #0d9488; }
@media (max-width: 640px) {
  .service-summary { gap: 6px; }
  .svc-summary-item { padding: 2px 10px; }
}

/* ===== 流水弹窗表格：文本水平居中 ===== */
.service-table-center th,
.service-table-center td { text-align: center; }
.service-table-center td[style*="text-overflow"] { text-align: left; } /* 备注列保持左对齐便于阅读 */

/* =============================================
   移动端管理员中心 — 功能宫格
   ============================================= */

/* ===== 功能宫格（分组卡片） ===== */
.staff-grid-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 14px 6px;
}
.staff-grid-group {
  background: var(--color-white, #fff);
  border-radius: 12px;
  box-shadow: 0 1px 4px var(--color-primary-shadow, rgba(255, 88, 155, 0.06));
  overflow: hidden;
}
.staff-grid-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary, #1f2937);
}
.staff-grid-group-title::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--color-primary, #FF589B);
  flex-shrink: 0;
}
.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 6px 8px 10px;
}
.staff-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 4px;
  min-height: 90px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  user-select: none;
}
/* 面板磁贴为链接，需去掉下划线与链接色，并保持块状布局 */
a.staff-grid-item {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
.staff-grid-item:hover {
  background: var(--color-primary-pale, #FFF5F8);
}
.staff-grid-item:active {
  background: var(--color-primary-bg, #FFE6ED);
  transform: scale(0.96);
}
.staff-grid-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary-pale, #FFF5F8), #ffffff);
  border: 1px solid var(--color-border, #f2e4ea);
  flex-shrink: 0;
}
.staff-grid-icon-emoji {
  font-size: 22px;
  line-height: 1;
}
.staff-grid-label {
  font-size: 12px;
  color: var(--color-text-primary, #1f2937);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 平板/桌面端：宫格列数放宽 */
@media (min-width: 768px) {
  .staff-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .staff-grid-section { padding: 4px 0 8px; }
  .staff-grid { grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 8px 14px 14px; }
  .staff-grid-group-title { padding: 16px 18px 4px; }
}

/* =============================================
   移动端：面板内容不超出屏幕（左右无横向滚动）
   ============================================= */
@media (max-width: 767px) {
  /* 面板整体禁止横向溢出 */
  .profile-tab-panel,
  .profile-main,
  .info-card {
    overflow-x: hidden;
  }

  /* 数据统计：饼图网格单列，画布自适应容器宽度 */
  .pie-charts-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pie-chart-canvas-wrap {
    max-width: 100%;
  }
  .pie-chart-card canvas {
    max-width: 100% !important;
  }
  .pie-chart-card {
    padding: 10px 6px;
  }
  .chart-empty {
    height: 200px;
  }
}

/* =============================================
   移动端宣传推广（#panel-members 的 promotion 视图）
   ============================================= */
@media (max-width: 767px) {
  /* 卡片列表 */
  .promo-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .promo-card {
    background: #fff;
    border: 1px solid #f1e4e8;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  /* 卡片头部：单行紧凑布局（复选 + 头像 + 信息 + 复制），不挤占信息区 */
  .promo-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #faf5f7;
    border-bottom: 1px solid #f1e4e8;
  }
  /* 复选按钮（触屏加大点击区） */
  .promo-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    cursor: pointer;
    position: relative;
  }
  .promo-check input {
    position: absolute;
    opacity: 0;
    width: 24px;
    height: 24px;
    margin: 0;
    cursor: pointer;
  }
  .promo-check-box {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: all .2s;
  }
  .promo-check input:checked + .promo-check-box {
    background: #FF589B;
    border-color: #FF589B;
  }
  .promo-check-icon {
    width: 12px;
    height: 6px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) scale(0);
    margin-top: -2px;
    transition: transform .18s;
  }
  .promo-check input:checked + .promo-check-box .promo-check-icon {
    transform: rotate(-45deg) scale(1);
  }
  .promo-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #f1e4e8;
  }
  .promo-card-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
  }
  .promo-card-name-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
  }
  .promo-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .promo-card-no {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
  }
  .promo-card-meta {
    font-size: 11.5px;
    color: #94a3b8;
  }
  .promo-copy-btn {
    flex-shrink: 0;
    padding: 5px 10px;
    background: #FF589B;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }
  .promo-copy-btn:active {
    transform: scale(0.96);
  }
  /* 移动端宣传推广：不展示征婚资料正文（promo-card-body），仅保留卡片头部信息 */
  .promo-card-body {
    display: none;
  }
  .promo-card-intro {
    font-size: 13.5px;
    line-height: 1.8;
    color: #475569;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    margin: 0;
    padding: 0;
  }
  .promo-card-empty {
    color: #9ca3af;
    font-size: 13px;
    padding: 2px 0;
  }

  /* 批量操作栏 → 固定底部操作条 */
  #promo-batch-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    margin: 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 18px rgba(0,0,0,0.10);
    gap: 10px;
    align-items: stretch;
  }
  #promo-batch-bar .promo-batch-top {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  #promo-batch-bar .promo-batch-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }
  #promo-batch-bar .filter-search-btn {
    width: 100%;
    min-width: 0;
    margin: 0;
    text-align: center;
  }
  /* 为固定底栏预留空间，避免遮挡列表与分页 */
  body.promo-batch-visible #member-list-pagination {
    padding-bottom: 96px;
  }
  .promo-batch-select-all {
    font-size: 13px;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
  }
  .promo-batch-select-all .check-box {
    width: 18px;
    height: 18px;
  }
}

/* =============================================
   移动端：会员筛选面板（#member-advanced-filter）
   布局参考首页"筛选"tab 的搜索控件：
   每个条件为一行（左侧标签 + 右侧满宽控件），
   底部"搜索/重置"为两个等宽大按钮
   ============================================= */
@media (max-width: 767px) {
  #member-advanced-filter {
    padding: 10px 14px 14px;
  }
  #member-advanced-filter .filter-row {
    display: block;
  }
  /* 每个条件占一整行：标签(左，固定宽) + 控件(右，撑满) */
  #member-advanced-filter .filter-row .filter-field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
    padding: 6px 0;
  }
  #member-advanced-filter .filter-row .filter-field.span2 {
    grid-column: auto;
  }
  #member-advanced-filter .filter-row .filter-field .filter-label {
    width: 84px;
    flex-shrink: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.3;
    color: #333;
    font-weight: 500;
  }
  /* 控件区撑满剩余宽度 */
  #member-advanced-filter .filter-row .filter-field > select,
  #member-advanced-filter .filter-row .filter-field > .hd-trigger,
  #member-advanced-filter .filter-row .filter-field > .filter-range,
  #member-advanced-filter .filter-row .filter-field > .filter-search-input,
  #member-advanced-filter .filter-row .filter-field > .region-selector-hd,
  #member-advanced-filter .filter-row .filter-field > .paired-exclude-wrap,
  #member-advanced-filter .filter-row .filter-field .region-selector-hd,
  #member-advanced-filter .filter-row .filter-field .hd-trigger.multi-select-trigger {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  /* 下拉/触发器高度统一（参考首页筛选控件 32px） */
  #member-advanced-filter .filter-row .filter-field select,
  #member-advanced-filter .filter-row .filter-field .filter-select,
  #member-advanced-filter .filter-row .filter-field .hd-trigger {
    height: 34px;
  }
  #member-advanced-filter .filter-row .filter-field .filter-select,
  #member-advanced-filter .filter-row .filter-field .hd-trigger {
    padding: 0 10px;
  }
  /* 工作性质多选触发器内联 width:100%，此处以 flex:1 撑满并去掉宽度上限 */
  #member-advanced-filter #empTypeContainer {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  #member-advanced-filter #empTypeContainer .hd-trigger.multi-select-trigger {
    flex: 1;
    width: auto !important;
    max-width: none;
  }
  /* 年龄/出生年份日期选择器触发器铺满 */
  #member-advanced-filter .filter-range {
    flex: 1;
    min-width: 0;
  }
  /* 工作地三级下拉铺满 */
  #member-advanced-filter .region-selector-hd {
    flex: 1;
    min-width: 0;
  }
  /* 排除已配对输入框铺满 */
  #member-advanced-filter .paired-exclude-wrap {
    flex: 1;
    min-width: 0;
  }
  /* 底部操作按钮：搜索/重置 等宽大按钮（参考首页 filter-actions） */
  #member-advanced-filter .filter-btn-inline {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    grid-column: auto;
  }
  #member-advanced-filter .filter-btn-inline .filter-search-btn,
  #member-advanced-filter .filter-btn-inline .filter-reset-btn {
    flex: 1;
    height: 42px;
    margin: 0;
    width: auto;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
  }
  #member-advanced-filter .filter-btn-inline .filter-reset-btn {
    background: #f3f4f6;
    color: #666;
    border: none;
  }
  #member-advanced-filter .filter-btn-inline .filter-reset-btn:active {
    background: #e5e7eb;
  }
}

/* =============================================
   移动端：配对管理（#panel-pairs）
   内容不超出屏幕，卡片纵向堆叠、操作按钮换行
   ============================================= */
@media (max-width: 767px) {
  #panel-pairs {
    padding: 4px 10px 20px;
  }
  /* —— 筛选栏：改为多行排布 —— */
  #pair-filter-bar {
    flex-wrap: wrap;
    gap: 6px;
  }
  /* 新增配对按钮占一整行 */
  #pair-filter-bar .action-btn.action-btn-primary {
    flex: 1 1 100%;
    margin: 0 0 2px;
    padding: 10px 0;
    font-size: 13px;
    border-radius: 12px;
  }
  /* 状态筛选按钮：每行 3 个（2 行排完 6 个） */
  #pair-filter-bar .filter-btn {
    flex: 1 1 30%;
    min-width: 0;
    font-size: 12px;
    padding: 8px 6px;
    border-radius: 12px;
  }
  /* 搜索框 + 清空按钮：同一行（搜索框自适应、按钮固定宽） */
  #pair-search-input {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
    height: 36px !important;
    margin: 4px 0 0 !important;
    font-size: 13px;
  }
  .pair-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    margin-top: 4px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
  }
  .pair-search-clear:active {
    background: #f3f4f6;
  }
  /* 排序下拉：两个并排 */
  #pair-filter-bar .follow-select.hd-trigger {
    flex: 1;
    margin-left: 0 !important;
    height: 36px;
    font-size: 12px;
  }

  /* —— 配对卡片：会员信息纵向堆叠 —— */
  .pair-card {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
  }
  .pair-members {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .pair-member {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 6px;
    align-items: start;
  }
  /* 头像：左列，跨两行垂直居中（与右侧三块整体居中对齐） */
  .pair-avatar-wrap {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }
  /* 徽标行允许换行，避免挤爆 */
  .pair-badge-row {
    flex-wrap: wrap;
  }
  /* 会员信息文本可自动换行（body 独占右列，不再被挤窄） */
  .pair-member-info {
    white-space: normal;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }
  /* 徽标行 + 信息行：右列第一行 */
  .pair-member-body {
    grid-column: 2;
    grid-row: 1;
  }
  /* 操作图标行：右列第二行（头像右侧，非全宽延伸），左对齐 */
  .pair-member-actions {
    gap: 2px;
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
  }

  /* —— 状态 + 元信息：三列表格（label 上 / value 下），与下方操作按钮整体协调 —— */
  .pair-meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 6px;
    align-items: start;
    margin-top: 8px;
    padding: 10px 12px;
    background: #f7f8fa;
    border-radius: 12px;
  }
  /* 元信息项：纵向，label 小灰字在上、value 深色在下（水平居中） */
  .pair-meta-item {
    flex-direction: column;
    align-items: center;
    background: transparent;
    padding: 0;
    gap: 1px;
    line-height: 1.4;
  }
  .pair-meta-label {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 400;
  }
  /* 状态徽章：同表格样式（label + value，水平居中） */
  .pair-status {
    flex-direction: column;
    align-items: center;
    background: transparent;
    min-width: auto;
    padding: 0;
  }
  .pair-status-label {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 400;
  }
  .pair-status-value {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
  }
  .pair-status.active .pair-status-value {
    color: #15803d;
  }
  .pair-status.ended .pair-status-value {
    color: #b91c1c;
  }
  /* 跟进内容：占一格，与「联系倒计」同排，标签与值水平居中 */
  .pair-meta-content {
    grid-column: auto;
    align-items: center;
    white-space: normal;
  }
  /* 备注：独占整行（跨三列），标签在上、值靠左排布，允许换行；琥珀底色整条 */
  .pair-meta-item.pair-remark {
    grid-column: 1 / -1;
    align-items: flex-start;
    text-align: left;
    white-space: normal;
    line-height: 1.5;
    padding: 6px 10px;
    border-radius: 8px;
  }
  .pair-meta-item.pair-remark .pair-meta-label {
    align-self: center;
  }
  /* 操作按钮区：浅灰面板（与 meta 面板对称），按钮白底描边 */
  .pair-actions {
    margin-top: 8px;
    background: #f7f8fa;
    border-radius: 12px;
    padding: 10px 12px;
    border-top: none;
    gap: 8px;
  }

  /* —— 跟进弹窗（添加跟进/修改跟进/修改配对等）：移动端适配 —— */
  .follow-modal {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 12px;
  }
  .follow-modal-header {
    padding: 14px 16px;
  }
  .follow-modal-body {
    padding: 14px 16px;
  }
  /* 表单行：标签堆叠到控件上方 */
  .follow-form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 14px;
  }
  .follow-label {
    width: 100%;
    flex-shrink: 0;
    padding-top: 0;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
  }
  .follow-select,
  .follow-select.hd-trigger,
  .follow-input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 15px;
    text-align: left;
    text-align-last: left;
  }
  .follow-textarea {
    width: 100%;
    min-height: 60px;
    font-size: 15px;
    text-align: left;
  }
  /* 下次跟进：快捷偏移下拉独占一行，日期选择器跟随 */
  .follow-next-controls {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .follow-offset-wrap {
    flex: 1 1 100%;
  }
  /* 提交按钮加大触控区域 */
  .follow-submit-btn {
    padding: 13px 12px;
    font-size: 15px;
  }
}

/* =============================================
   移动端：督办台帐（#panel-supervision）
   表单纵向堆叠、列表转卡片，桌面端保持不变
   ============================================= */
@media (max-width: 767px) {
  #panel-supervision {
    padding: 4px 10px 20px;
  }
  /* —— 新增/编辑表单：纵向堆叠 —— */
  .sup-form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .sup-form-actions {
    display: flex;
    gap: 10px;
  }
  .sup-form-actions .action-btn {
    flex: 1;
    text-align: center;
    padding: 10px 0;
  }
  /* —— 状态筛选：等宽按钮占满 —— */
  #supervision-filter-bar .filter-btn {
    flex: 1;
  }

  /* —— 列表：表格 → 卡片 —— */
  .supervision-table {
    display: block;
    border: none;
    overflow: visible;
    background: transparent;
  }
  .supervision-row-head {
    display: none !important;
  }
  .supervision-row {
    display: block;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    padding: 2px 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  }
  .supervision-row.sup-editing {
    border-color: #FF589B;
  }
  .sup-col {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: auto;
    min-width: 0;
    padding: 8px 0;
    border: none;
    border-bottom: 1px dashed #eef2f6;
    text-align: left;
    justify-content: flex-start;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: 13px;
  }
  .sup-col::before {
    content: attr(data-label);
    flex-shrink: 0;
    width: 70px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
  }
  .sup-col.col-date::before { content: '创建日期'; }
  .sup-col.col-status::before { content: '状态'; }
  .sup-col.col-contact::before { content: '联系对象'; }
  .sup-col.col-title::before { content: '督办事项'; }
  .sup-col.col-content::before { content: '督办内容'; }
  .sup-col.col-impl::before { content: '落实情况'; }
  .sup-col.col-plan::before { content: '下一步计划'; }
  .sup-col.col-action::before { content: ''; width: 0; }
  /* 状态徽标：与上方「创建日期」值顶部对齐 */
  .sup-col.col-status {
    align-items: flex-start;
  }
  .sup-col.col-status .status-badge {
    margin: 0;
  }
  /* 联系对象：标签、头像、信息文字垂直居中 */
  .sup-col.col-contact {
    justify-content: flex-start;
    text-align: left;
    align-items: center;
  }
  .sup-col.col-contact .sup-contact-cell {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
  .sup-col.col-contact .sup-contact-top {
    display: contents;
  }
  .sup-col.col-contact .sup-contact-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  .sup-col.col-contact .sup-contact-actions {
    display: none;
  }
  .sup-col.col-contact .sup-contact-info {
    flex: 1;
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  /* 操作按钮：编辑/完成/删除 三个按钮同一行均分铺满 */
  .sup-col.col-action {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    padding: 10px 0;
    border-bottom: none;
  }
  .sup-col.col-action .action-btn {
    flex: 1 1 0;
    text-align: center;
    margin: 0;
    padding: 9px 6px;
    font-size: 13px;
  }
}

/* ===== 服务政策面板 ===== */
.policy-edit-tip {
  color: #6b7280;
  font-size: 13px;
  margin: 0 0 12px;
}
.policy-content-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 320px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
  border: 1.5px solid #f1e4e8;
  border-radius: 10px;
  color: #374151;
  resize: vertical;
  background: #fff;
}
.policy-content-textarea:focus {
  outline: none;
  border-color: #FF589B;
}
.policy-edit-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.policy-save-btn {
  padding: 9px 26px;
  font-size: 14px;
}
.policy-msg {
  font-size: 13px;
}
.policy-msg.success { color: #2e7d32; }
.policy-msg.error { color: #c62828; }

/* 服务政策面板：格式说明提示 */
.policy-format-hint {
  margin: 0 0 12px;
  padding: 10px 14px 10px 30px;
  background: #fff7fa;
  border: 1px dashed #f4b8cd;
  border-radius: 8px;
  list-style: disc;
  color: #7a5c66;
  font-size: 13px;
  line-height: 1.7;
}
.policy-format-hint li {
  margin-bottom: 2px;
}
.policy-format-hint b {
  color: #d94f82;
  font-weight: 700;
}


/* ===== 个人备注弹窗（美化版） ===== */
.pair-remark-modal .follow-modal-body {
  padding: 22px 26px 24px;
}
.pair-remark-sub {
  margin: 0 0 16px;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.6;
}

/* 选择对象（男方/女方） */
.pair-remark-people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.pair-remark-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #eef0f4;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.pair-remark-person:hover {
  border-color: #f0b8cd;
}
.pair-remark-person.active {
  border-color: #ff6b9d;
  background: #fff5f8;
  box-shadow: 0 2px 10px rgba(255, 107, 157, 0.14);
}
.pair-remark-gender {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.pair-remark-person.male .pair-remark-gender { background: linear-gradient(135deg, #4d94ff, #3b82f6); }
.pair-remark-person.female .pair-remark-gender { background: linear-gradient(135deg, #ff6b9d, #ec4899); }
.pair-remark-info {
  flex: 1;
  min-width: 0;
}
.pair-remark-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pair-remark-no {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}
.pair-remark-tag {
  font-size: 11px;
  color: #9ca3af;
  flex-shrink: 0;
}
.pair-remark-person.active .pair-remark-tag {
  color: #ff6b9d;
  font-weight: 600;
}

/* 备注编辑区 */
.pair-remark-field {
  margin-bottom: 4px;
}
.pair-remark-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pair-remark-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}
.pair-remark-count {
  font-size: 12px;
  color: #b0b6c0;
}
.pair-remark-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1.5px solid #eef0f4;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #1f2937;
  resize: vertical;
  font-family: inherit;
  background: #fafbfc;
  transition: border-color 0.2s, background 0.2s;
}
.pair-remark-field textarea:focus {
  outline: none;
  border-color: #ff6b9d;
  background: #fff;
}

/* 提示信息 */
.pair-remark-msg {
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}
.pair-remark-msg.success { color: #2e7d32; }
.pair-remark-msg.error { color: #c62828; }

/* 底部按钮 */
.pair-remark-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}
.pair-remark-btn-cancel,
.pair-remark-btn-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, box-shadow 0.2s;
}
.pair-remark-btn-cancel {
  background: #f3f4f6;
  color: #6b7280;
  border: none;
}
.pair-remark-btn-cancel:hover {
  background: #e5e7eb;
}
.pair-remark-btn-save {
  background: linear-gradient(135deg, #ff6b9d, #ff589b);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(255, 88, 155, 0.28);
}
.pair-remark-btn-save:hover {
  box-shadow: 0 6px 16px rgba(255, 88, 155, 0.36);
  transform: translateY(-1px);
}
.pair-remark-btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 480px) {
  .pair-remark-people {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
