/* ========== 全局变量与重置 ========== */
:root {
  --primary: #2B7FFF;
  --primary-light: #60A5FF;
  --primary-gradient: linear-gradient(135deg, #2B7FFF 0%, #60A5FF 100%);
  --bg-page: #F5F7FA;
  --bg-card: #FFFFFF;
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-tertiary: #6B7280;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --light-blue-bg: #EEF3FF;
  --border: #E5E7EB;
  --border-light: #F0F2F5;
  --shadow-card: 0 2px 8px rgba(31, 41, 55, 0.06);
  --shadow-btn: 0 4px 12px rgba(43, 127, 255, 0.3);
  --radius-card: 16px;
  --radius-btn: 10px;
  --radius-table: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #root {
  height: 100%;
  min-width: 1200px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }

/* ========== 登录页 ========== */
.login-page {
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: -200px;
  left: -200px;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  bottom: -100px;
  right: -100px;
}

.login-card {
  width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px 40px;
  box-shadow: 0 20px 60px rgba(31, 41, 55, 0.2);
  position: relative;
  z-index: 1;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}

.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}

.login-form-item {
  margin-bottom: 20px;
}

.login-form-item label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.login-form-item input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s;
}

.login-form-item input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.15);
}

.login-btn {
  width: 100%;
  height: 46px;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-btn);
  transition: all 0.2s;
  margin-top: 8px;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(43, 127, 255, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

.login-tip {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 16px;
}

/* ========== 后台布局 ========== */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 600px;
}

.app-header {
  height: 60px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #fff;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  backdrop-filter: blur(6px);
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.header-user:hover {
  background: rgba(255, 255, 255, 0.15);
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.header-username {
  font-size: 14px;
}

.header-logout {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  transition: background 0.2s;
}

.header-logout:hover {
  background: rgba(255, 255, 255, 0.3);
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ========== 侧边栏 ========== */
.app-sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
  padding: 16px 12px;
  flex-shrink: 0;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-group-title {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 12px 12px 6px;
  font-weight: 500;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.menu-item:hover {
  background: var(--light-blue-bg);
  color: var(--primary);
}

.menu-item.active {
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(43, 127, 255, 0.25);
}

.menu-item-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

.menu-sub-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 4px;
  margin-top: 2px;
}

.menu-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 32px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.menu-sub-item:hover {
  background: var(--light-blue-bg);
  color: var(--primary);
}

.menu-sub-item.active {
  background: var(--light-blue-bg);
  color: var(--primary);
  font-weight: 500;
}

.menu-sub-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.menu-sub-item.active .menu-sub-dot {
  background: var(--primary);
}

/* ========== 主内容区 ========== */
.app-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.page-breadcrumb {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.page-breadcrumb span {
  color: var(--primary);
}

/* ========== 卡片 ========== */
.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
}

.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 20px;
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(43, 127, 255, 0.35);
}

.btn-default {
  background: #fff;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-default:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: #fff;
  color: var(--danger);
  border-color: #FECACA;
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-link {
  background: transparent;
  color: var(--primary);
  padding: 0 4px;
  height: auto;
  border: none;
  font-size: 13px;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link.danger {
  color: var(--danger);
}

.btn-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ========== 表单 ========== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-label .required {
  color: var(--danger);
  margin-right: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-primary);
  background: #fff;
  transition: all 0.2s;
}

.form-textarea {
  height: auto;
  padding: 8px 12px;
  resize: vertical;
  min-height: 72px;
  line-height: 1.6;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.12);
}

.form-input:disabled,
.form-select:disabled {
  background: var(--bg-page);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ========== 状态标签 ========== */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.8;
  text-align: center;
  min-width: 50px;
}

.tag-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.tag-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.tag-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.tag-primary {
  background: rgba(43, 127, 255, 0.12);
  color: var(--primary);
}

.tag-default {
  background: rgba(107, 114, 128, 0.12);
  color: var(--text-tertiary);
}

.tag-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #2563EB;
}

.tag-dark {
  background: rgba(31, 41, 55, 0.15);
  color: #1F2937;
}

.tag-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #8B5CF6;
}

/* ========== 统计卡片 ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.stat-card:hover {
  box-shadow: 0 4px 16px rgba(31, 41, 55, 0.1);
  transform: translateY(-1px);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.blue { background: linear-gradient(135deg, #EEF3FF, #D6E4FF); color: var(--primary); }
.stat-icon.green { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); color: var(--success); }
.stat-icon.orange { background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: var(--warning); }
.stat-icon.red { background: linear-gradient(135deg, #FEE2E2, #FECACA); color: var(--danger); }
.stat-icon.purple { background: linear-gradient(135deg, #EDE9FE, #DDD6FE); color: #8B5CF6; }
.stat-icon.cyan { background: linear-gradient(135deg, #CFFAFE, #A5F3FC); color: #06B6D4; }

.stat-info {
  flex: 1;
  min-width: 0;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.stat-trend {
  font-size: 12px;
  margin-top: 4px;
}

.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ========== 图表区域 ========== */
.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.chart-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.chart-container {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  padding: 20px;
}

.chart-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.chart-box {
  width: 100%;
  min-height: 280px;
}

/* ========== 表格 ========== */
.table-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  flex: 1;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-item label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.filter-item input,
.filter-item select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  min-width: 120px;
}

.filter-item input:focus,
.filter-item select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.12);
}

.filter-item input[type="number"] {
  min-width: 80px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: var(--light-blue-bg);
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
  padding: 12px 14px;
  white-space: nowrap;
  font-size: 13px;
}

.data-table th:first-child {
  border-top-left-radius: 0;
}

.data-table th:last-child {
  border-top-right-radius: 0;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.data-table tbody tr:hover {
  background: #F0F4F8;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ========== 分页 ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0 8px;
}

/* ========== 弹窗 ========== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 55, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(31, 41, 55, 0.25);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 弹窗内部表单统一样式 */
.modal-lg { width: 720px; }
.modal-xl { width: 880px; }
.modal-md { width: 520px; }
.modal-sm { width: 380px; }
.modal-form { width: 560px; }

.modal-form-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-form-row .form-item-full {
  grid-column: 1 / -1;
}

.modal-form-body .form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.modal-form-body .form-label .required {
  color: #EF4444;
  margin-right: 3px;
}

.modal-form-body input[type="text"],
.modal-form-body input[type="number"],
.modal-form-body input[type="password"],
.modal-form-body select,
.modal-form-body textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 13px;
  color: #1F2937;
  background: #fff;
  transition: all 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.modal-form-body select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.modal-form-body textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.modal-form-body input:focus,
.modal-form-body select:focus,
.modal-form-body textarea:focus {
  outline: none;
  border-color: #2B7FFF;
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.12);
}

.modal-form-body .input-readonly {
  background: #F9FAFB;
  border: 1px dashed #D1D5DB;
  color: #6B7280;
  cursor: default;
}

.modal-form-body .input-readonly:focus {
  border-color: #D1D5DB;
  box-shadow: none;
}

/* 信息卡片样式（只读展示字段） */
.info-card {
  padding: 10px 14px;
  border-radius: 8px;
  background: #F0F7FF;
  border: 1px solid #BFDBFE;
  font-size: 13px;
  color: #1E40AF;
  line-height: 1.5;
}

.info-card.info-card-warn {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
}

.info-card.info-card-success {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #065F46;
}

.info-card strong {
  font-weight: 600;
}

/* 密码输入框带显隐切换 */
.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 38px !important;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: #9CA3AF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.password-toggle-btn:hover {
  color: #374151;
}

/* 附件区域 */
.attachment-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #F3F4F6;
  border-radius: 6px;
  font-size: 12px;
  color: #4B5563;
}

.attachment-item .attachment-size {
  color: #9CA3AF;
  font-size: 11px;
}

.attachment-item .attachment-del {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 2px;
}

.attachment-item .attachment-del:hover {
  color: #EF4444;
}

.attachment-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 64px;
  border: 1px dashed #D1D5DB;
  border-radius: 6px;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
  background: #FAFAFA;
}

.attachment-upload:hover {
  border-color: #2B7FFF;
  background: #F0F7FF;
  color: #2B7FFF;
}

/* 下拉菜单（用户头像） */
.header-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0,0,0,0.06);
  min-width: 160px;
  padding: 6px;
  z-index: 1100;
  animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.header-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s;
}

.header-dropdown-item:hover {
  background: #F0F7FF;
  color: #2B7FFF;
}

.header-dropdown-item.danger {
  color: #DC2626;
}

.header-dropdown-item.danger:hover {
  background: #FEF2F2;
  color: #DC2626;
}

.header-dropdown-divider {
  height: 1px;
  background: #F3F4F6;
  margin: 4px 0;
}

.header-user-wrap {
  position: relative;
}
.import-modal { width: 980px; max-height: 90vh; display: flex; flex-direction: column; }
.import-modal .modal-body { overflow-y: auto; flex: 1; }

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--bg-page);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 4px 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

/* ========== Toast ========== */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(31, 41, 55, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s ease;
  pointer-events: auto;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.warning { background: var(--warning); color: #fff; }
.toast.info { background: var(--primary); color: #fff; }

/* ========== 详情页 ========== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.detail-item {
  display: flex;
  font-size: 13px;
  line-height: 1.8;
}

.detail-label {
  color: var(--text-tertiary);
  min-width: 90px;
  flex-shrink: 0;
}

.detail-value {
  color: var(--text-primary);
  font-weight: 500;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

/* ========== Tabs ========== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
}

.tab-item {
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  font-weight: 500;
}

.tab-item:hover {
  color: var(--primary);
}

.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ========== 搜索框 ========== */
.search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-box input {
  height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  width: 220px;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.12);
}

.search-box-icon {
  position: absolute;
  left: 10px;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* ========== 多选下拉 ========== */
.multi-select {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.multi-select-trigger {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.2s;
  box-sizing: border-box;
  white-space: nowrap;
}

.multi-select-trigger:hover {
  border-color: var(--primary);
}

.multi-select-trigger-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
  text-align: left;
}

.multi-select-trigger-arrow {
  font-size: 10px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  line-height: 1;
}

.multi-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.12);
  max-height: 260px;
  overflow-y: auto;
  z-index: 200;
  padding: 4px 0;
}

.multi-select-option {
  padding: 0 12px;
  height: 32px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 32px;
  box-sizing: border-box;
  transition: background 0.15s;
}

.multi-select-option:hover {
  background: var(--light-blue-bg);
}

.multi-select-option-checkbox {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--primary);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.multi-select-option-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* ========== 操作历史 ========== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 8px;
}

.timeline-item {
  display: flex;
  gap: 14px;
  position: relative;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: -18px;
  width: 2px;
  background: var(--border-light);
}

.timeline-content {
  flex: 1;
  padding-bottom: 4px;
}

.timeline-title {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 2px;
}

.timeline-time {
  font-size: 12px;
  color: var(--text-tertiary);
}

.timeline-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========== 详情页返回 ========== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 16px;
  font-weight: 500;
}

.back-btn:hover {
  text-decoration: underline;
}

/* ========== 确认弹窗 ========== */
.confirm-body {
  padding: 24px;
  text-align: center;
}

.confirm-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.confirm-icon.warning { color: var(--warning); }
.confirm-icon.danger { color: var(--danger); }

.confirm-text {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-weight: 500;
}

.confirm-desc {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ========== 设置页 ========== */
.settings-section {
  margin-bottom: 24px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 14px;
  color: var(--text-primary);
}

.settings-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.settings-control {
  width: 240px;
}

/* 选中行 */
.data-table tbody tr.row-selected {
  background: var(--light-blue-bg);
}

/* 下架行 */
.data-table tbody tr.row-offline {
  background: #F9FAFB;
}
.data-table tbody tr.row-offline td {
  color: #9CA3AF;
}

/* 行内编辑行 */
.data-table tbody tr.row-editing {
  background: #FAFBFF;
}

.data-table .row-edit-input {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  box-sizing: border-box;
}

.data-table .row-edit-input:focus {
  box-shadow: 0 0 0 2px rgba(43, 127, 255, 0.15);
}

.data-table .row-edit-select {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  box-sizing: border-box;
}\n
.row-edit-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.checkbox-cell {
  width: 36px;
  text-align: center;
}

.checkbox-cell input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
}

/* 二维码相关 */
.qr-thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  vertical-align: middle;
  object-fit: cover;
}

.qr-thumb-large {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.qr-tooltip-wrapper {
  position: relative;
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}

.qr-tooltip-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.18);
  z-index: 500;
  display: none;
  white-space: nowrap;
}

.qr-tooltip-wrapper:hover .qr-tooltip-popup {
  display: block;
}

.qr-tooltip-popup img {
  width: 140px;
  height: 140px;
  border-radius: 6px;
  display: block;
}

.qr-tooltip-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}

/* 图片上传 */
.image-upload {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.image-upload-area {
  width: 100px;
  height: 100px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 12px;
  transition: all 0.2s;
  background: #FAFBFF;
  gap: 4px;
}

.image-upload-area:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--light-blue-bg);
}

.image-upload-area .upload-icon {
  font-size: 24px;
  line-height: 1;
}

.image-upload-preview {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.image-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-upload-preview .upload-change {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 11px;
  text-align: center;
  padding: 3px 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.image-upload-preview:hover .upload-change {
  opacity: 1;
}

/* 行内编辑中的二维码小图 */
.row-qr-upload {
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-qr-upload img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.row-qr-upload .qr-change-link {
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
}

.row-qr-upload .qr-change-link:hover {
  text-decoration: underline;
}

/* 商品ID标签输入 */
.goods-tag-input {
  min-height: 28px;
}
.goods-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.goods-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #EFF6FF;
  color: #1D4ED8;
  border-radius: 12px;
  font-size: 12px;
  font-family: monospace;
  white-space: nowrap;
}
.goods-tag-close {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0.7;
}
.goods-tag-close:hover {
  opacity: 1;
}
.goods-tag-input-field {
  border: none;
  outline: none;
  min-width: 80px;
  flex: 1;
  font-size: 12px;
  padding: 2px 4px;
  background: transparent;
}

/* 宽表格：横向滚动 + 操作列固定 */
.wide-table {
  overflow-x: auto;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}

.wide-table .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* 表格单元格文本悬停气泡（自定义tooltip） */
.cell-tooltip {
  position: relative;
  display: inline-block;
  max-width: 100%;
  cursor: default;
}

.cell-tooltip .cell-tooltip-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.18);
  z-index: 1000;
  display: none;
  white-space: normal;
  font-size: 13px;
  color: #1F2937;
  line-height: 1.6;
  min-width: 120px;
  max-width: 360px;
  border: 1px solid rgba(209, 213, 219, 0.5);
}

.cell-tooltip .cell-tooltip-popup .cell-tooltip-line {
  display: block;
  line-height: 1.6;
}

.cell-tooltip .cell-tooltip-popup .cell-tooltip-line + .cell-tooltip-line {
  margin-top: 2px;
}

.cell-tooltip:hover .cell-tooltip-popup {
  display: block;
}

.cell-tooltip .cell-tooltip-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 20px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
  pointer-events: none;
}

/* 全局Portal渲染的气泡（fixed定位，不被overflow裁剪） */
.cell-tooltip-popup-global {
  position: fixed;
  background: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.18), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 9999;
  white-space: normal;
  font-size: 13px;
  color: #1F2937;
  line-height: 1.6;
  min-width: 120px;
  max-width: 360px;
  border: 1px solid rgba(209, 213, 219, 0.5);
  pointer-events: none;
}

.cell-tooltip-popup-global .cell-tooltip-line {
  display: block;
  line-height: 1.6;
}

.cell-tooltip-popup-global .cell-tooltip-line + .cell-tooltip-line {
  margin-top: 2px;
}

/* 宿主元素（inline，与文本融合） */
.cell-tooltip-host {
  display: inline;
  position: relative;
  max-width: 100%;
}

/* 群名称列二维码图标按钮 */
.group-qr-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 4px;
  cursor: pointer;
  vertical-align: middle;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  transition: all 0.2s;
  flex-shrink: 0;
  flex-grow: 0;
}

.group-qr-icon-btn:hover {
  background: #DBEAFE;
  border-color: #60A5FA;
  transform: scale(1.1);
}

/* 产品名称列：单行省略，紧凑间距 */
.col-product-name .product-name-item {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.5;
  font-size: 13px;
  color: #4B5563;
  height: 1.5em;
}

.col-product-name .product-name-item + .product-name-item {
  margin-top: 2px;
}

/* 群名称列：一行优先显示 + 省略 */
.col-group-name .group-name-text {
  display: inline-block;
  vertical-align: middle;
  max-width: calc(100% - 40px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.wide-table .data-table .col-action-sticky {
  position: sticky;
  right: 0;
  background: #fff;
  z-index: 1;
  box-shadow: -4px 0 8px -4px rgba(0,0,0,0.08);
  min-width: 140px;
}

.wide-table .data-table thead th.col-action-sticky {
  z-index: 3;
  background: var(--light-blue-bg);
}

.wide-table .data-table tbody tr:hover .col-action-sticky {
  background: #F0F4F8;
}

.wide-table .data-table tbody tr.row-selected .col-action-sticky {
  background: #EFF6FF;
}

.wide-table .data-table tbody tr.row-editing .col-action-sticky {
  background: #FFFBEB;
}

/* 客服群码查询页 */
.cs-page-desc {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--light-blue-bg);
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  border-left: 3px solid var(--primary);
}

.cs-search-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  padding: 24px;
  margin-bottom: 20px;
}

.cs-search-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-search-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.cs-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.cs-qr-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  object-fit: cover;
}

/* 二维码大图预览弹窗 */
.qr-preview-modal .modal-body {
  text-align: center;
  padding: 30px;
}

.qr-preview-modal img {
  width: 280px;
  height: 280px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.qr-preview-info {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: left;
  background: var(--bg-page);
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 8px;
}

/* ===== 行内编辑 ===== */
tr.row-editing {
  background: #F0F7FF;
}

.row-edit-input, .row-edit-select {
  width: 100%;
  min-width: 60px;
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid #93C5FD;
  border-radius: 6px;
  background: #fff;
  color: var(--text-primary);
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s;
}

.row-edit-input:focus, .row-edit-select:focus {
  border-color: #2B7FFF;
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.15);
}

.row-edit-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.row-edit-actions .btn {
  padding: 4px 12px;
  font-size: 12px;
}

.row-qr-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.row-qr-upload img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.qr-change-link {
  font-size: 11px;
  color: #2B7FFF;
  cursor: pointer;
  white-space: nowrap;
}

.qr-change-link:hover {
  text-decoration: underline;
}

/* 列表中二维码缩略图与tooltip */
.qr-thumb {
  width: 18px;
  height: 18px;
  margin-left: 6px;
  vertical-align: middle;
  cursor: pointer;
  border-radius: 3px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.qr-thumb:hover {
  opacity: 1;
}

.qr-tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.qr-tooltip-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.15);
  z-index: 100;
  margin-bottom: 6px;
}

.qr-tooltip-popup img {
  width: 160px;
  height: 160px;
  display: block;
  border-radius: 6px;
}

.qr-tooltip-wrapper:hover .qr-tooltip-popup {
  display: block;
}

/* 详情页大二维码 */
.qr-thumb-large {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.08);
}

/* 图片上传组件 */
.image-upload {
  display: inline-block;
}

.image-upload-area {
  width: 120px;
  height: 120px;
  border: 1px dashed #D1D5DB;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: #9CA3AF;
  background: #FAFBFC;
  transition: all 0.2s;
  gap: 6px;
}

.image-upload-area:hover {
  border-color: #2B7FFF;
  color: #2B7FFF;
  background: #EEF3FF;
}

.image-upload-area .upload-icon {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.image-upload-preview {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
}

.image-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-upload-preview .upload-change {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.image-upload-preview:hover .upload-change {
  opacity: 1;
}

/* ===== 客服群码查询页 ===== */
.cs-page-desc {
  background: #EEF3FF;
  border-left: 3px solid #2B7FFF;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
  font-size: 13px;
  color: #1E40AF;
  line-height: 1.6;
}

.cs-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.cs-qr-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
}

.cs-qr-thumb:hover {
  transform: scale(1.1);
}

/* ========== 批量导入弹窗 ========== */

.import-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 24px 0;
  gap: 0;
}

.import-step {
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 20px;
}

.import-step .step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E5E7EB;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  margin-right: 8px;
  flex-shrink: 0;
}

.import-step.active .step-circle {
  background: var(--primary);
  color: #fff;
}

.import-step.done .step-circle {
  background: #10B981;
  color: #fff;
}

.import-step .step-label {
  font-size: 14px;
  color: #9CA3AF;
  font-weight: 500;
  white-space: nowrap;
}

.import-step.active .step-label {
  color: var(--primary);
}

.import-step.done .step-label {
  color: #10B981;
}

.import-step .step-line {
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 2px;
  background: #E5E7EB;
}

.import-step.done .step-line {
  background: #10B981;
}

.import-step-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 模板提示 */
.import-template-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  background: #EFF6FF;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.import-template-tip .btn-link {
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 13px;
  padding: 0;
}

.import-template-tip .tip-text {
  color: #9CA3AF;
  font-size: 12px;
}

/* 上传区域 */
.upload-area {
  border: 2px dashed #D1D5DB;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #FAFBFC;
}

.upload-area:hover {
  border-color: var(--primary);
  background: #F0F7FF;
}

.upload-area.drag-over {
  border-color: var(--primary);
  background: #EFF6FF;
}

.upload-area.parsing {
  cursor: default;
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.upload-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.upload-tip {
  font-size: 12px;
  color: #9CA3AF;
}

.upload-parsing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E5E7EB;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 导入说明 */
.import-tips {
  background: #F9FAFB;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  color: #6B7280;
}

.import-tips .tips-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 13px;
}

.import-tips ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

/* 统计卡片 */
.import-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px 20px;
  text-align: center;
}

.stat-card .stat-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-card.stat-update .stat-num { color: var(--primary); }
.stat-card.stat-new .stat-num { color: #10B981; }
.stat-card.stat-error .stat-num { color: #EF4444; }
.stat-card.stat-success .stat-num { color: #10B981; }

/* Tab 切换 */
.import-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  gap: 0;
}

.import-tab {
  padding: 10px 18px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-weight: 500;
  transition: all 0.2s;
}

.import-tab:hover {
  color: var(--primary);
}

.import-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.import-tab-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tab-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.tab-count {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: auto;
}

.tab-tip {
  font-size: 12px;
  color: var(--primary);
  margin-left: 0;
}

.import-preview-table {
  max-height: 340px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}

.import-preview-table .data-table th {
  font-size: 12px;
  padding: 10px 12px;
  background: #F3F4F6;
}

.import-preview-table .data-table td {
  padding: 8px 12px;
  font-size: 12px;
}

/* 变化单元格高亮 */
.cell-changed {
  background: #FFF7E6;
  color: #D97706;
  font-weight: 500;
}

.cell-changed .old-val {
  text-decoration: line-through;
  color: #9CA3AF;
  font-weight: 400;
  font-size: 11px;
}

.cell-changed .arrow {
  margin: 0 4px;
  color: #D97706;
  font-size: 11px;
}

.cell-changed .new-val {
  color: #D97706;
  font-weight: 600;
}

.row-nochange td {
  color: #9CA3AF;
}

.no-change-tag {
  color: #9CA3AF;
  font-size: 11px;
  font-style: italic;
}

.row-new td {
  background: #F0FDF4;
}

.row-new.row-selected td {
  background: #DCFCE7;
}

.row-error td {
  background: #FEF2F2;
}

.error-reasons {
  color: #DC2626;
  font-size: 12px;
  line-height: 1.6;
}

.error-reason {
  color: #DC2626;
  font-size: 12px;
}

/* 导入结果页 */
.import-result-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.result-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.result-icon.success {
  background: linear-gradient(135deg, #10B981, #059669);
}

.result-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.result-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.import-failures {
  margin-top: 8px;
}

.failures-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== 服务质量 - 通用 ========== */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
}

.tab-item {
  padding: 12px 24px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-weight: 500;
  transition: all 0.2s;
}

.tab-item:hover {
  color: var(--primary);
}

.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.result-count {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 12px 0;
}

/* ========== 巡检看板 ========== */
.row-abnormal td {
  background: #FEF2F2;
}

.row-abnormal:hover td {
  background: #FEE2E2 !important;
}

/* 侧边抽屉 */
.drawer-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.drawer {
  background: #fff;
  height: 100%;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-right {
  width: 500px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
}

.drawer-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.inspection-info {
  background: #F9FAFB;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.info-row {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.info-row:last-child { margin-bottom: 0; }
.info-label {
  color: var(--text-secondary);
  min-width: 70px;
}

/* 时间线 */
.record-timeline {
  position: relative;
  padding-left: 20px;
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-content {
  background: #F9FAFB;
  border-radius: 8px;
  padding: 12px 14px;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.timeline-time {
  font-family: monospace;
}

.timeline-person {
  font-weight: 500;
  color: var(--primary);
}

.timeline-problem, .timeline-measure {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.timeline-measure {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* ========== 通知模板库 ========== */
.notify-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.notify-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  padding: 16px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: sticky;
  top: 20px;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 16px 12px 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
}

.category-list {
  display: flex;
  flex-direction: column;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.category-item:hover {
  background: #F3F4F6;
  color: var(--text-primary);
}

.category-item.active {
  background: #EFF6FF;
  color: var(--primary);
  font-weight: 500;
  border-right: 3px solid var(--primary);
}

.cat-icon { font-size: 16px; }
.cat-label { flex: 1; }
.cat-arrow { font-size: 10px; color: #9CA3AF; }

.sub-category-list {
  padding: 4px 0 8px 0;
}

.sub-category-item {
  padding: 8px 16px 8px 44px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.sub-category-item:hover {
  background: #F9FAFB;
  color: var(--primary);
}

.sub-category-item.active {
  color: var(--primary);
  font-weight: 500;
  background: #F0F7FF;
}

.notify-main {
  flex: 1;
  min-width: 0;
}

.toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.template-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.template-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.template-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.template-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.template-time-tag {
  font-size: 11px;
  padding: 3px 8px;
  background: #EFF6FF;
  color: var(--primary);
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.template-scene {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.template-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-outline {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
}

.template-preview {
  background: #F9FAFB;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #6B7280;
  line-height: 1.6;
  max-height: 72px;
  overflow: hidden;
  position: relative;
}

.preview-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-more {
  position: absolute;
  bottom: 4px;
  right: 8px;
  background: #F9FAFB;
  padding: 0 4px;
  color: #9CA3AF;
}

.template-actions {
  display: flex;
  gap: 4px;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
  margin-top: auto;
}

/* 模板详情 */
.template-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.detail-section h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--text-primary);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

.template-content-box {
  background: #F9FAFB;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.variants-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variant-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-secondary);
}

.variant-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-top: 2px;
}

.tips-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.usage-table .data-table {
  font-size: 13px;
}

/* ========== 运营答疑库 ========== */
.faq-hero {
  background: linear-gradient(135deg, #E0F2FE 0%, #EFF6FF 100%);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  margin-bottom: 24px;
}

.faq-hero-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.faq-hero-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.faq-search-box {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto 16px auto;
}

.faq-search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #fff;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.faq-search-input:focus {
  border-color: var(--primary);
}

.faq-search-btn {
  padding: 12px 28px !important;
}

.faq-hot-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}

.hot-label {
  color: var(--text-secondary);
}

.hot-tag {
  padding: 4px 12px;
  background: rgba(255,255,255,0.7);
  border-radius: 14px;
  cursor: pointer;
  color: var(--primary);
  font-size: 12px;
  transition: all 0.2s;
}

.hot-tag:hover {
  background: #fff;
  color: var(--primary-dark);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.faq-panel {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.2s;
}

.faq-panel:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.faq-panel.expanded {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: var(--primary-light);
}

.faq-panel-header {
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.faq-q-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.faq-q-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

.faq-panel-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.faq-cat-tag {
  padding: 3px 10px;
  background: #F3F4F6;
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-secondary);
}

.faq-expand-icon {
  color: #9CA3AF;
  font-size: 10px;
}

.faq-panel-body {
  padding: 0 20px 20px 54px;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.faq-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}

.faq-solution {
  margin-bottom: 14px;
}

.solution-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 14px;
}

.solution-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #10B981;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.solution-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-primary);
  background: #F9FAFB;
  border-radius: 8px;
  padding: 12px 16px;
}

.solution-step {
  padding-left: 4px;
}

.faq-related {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.related-link {
  padding: 3px 10px;
  background: #EFF6FF;
  color: var(--primary);
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
}

.related-link:hover {
  background: #DBEAFE;
}

.faq-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--border-light);
  font-size: 12px;
  color: #9CA3AF;
}

.faq-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-submit-bar {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border-radius: 12px;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.submit-title {
  font-size: 18px;
  font-weight: 600;
  color: #92400E;
  margin-bottom: 4px;
}

.submit-desc {
  font-size: 13px;
  color: #B45309;
}

/* ========== 促活素材库 ========== */
.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.material-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s;
}

.material-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.material-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.material-type-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.material-stage-tag {
  font-size: 11px;
  color: var(--text-secondary);
  background: #F3F4F6;
  padding: 3px 8px;
  border-radius: 4px;
}

.material-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.material-preview {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-height: 60px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.material-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #9CA3AF;
}

.material-actions {
  display: flex;
  gap: 4px;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
  margin-top: auto;
}

.material-detail, .activity-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 65vh;
  overflow-y: auto;
}

.material-detail-title, .activity-detail-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}

.material-content-box {
  background: #F9FAFB;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.material-tip {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 12px 16px;
  background: #FFFBEB;
  border-radius: 8px;
  border-left: 3px solid #F59E0B;
}

/* 进度条 */
.progress-bar {
  position: relative;
  height: 20px;
  background: #E5E7EB;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #2563EB);
  border-radius: 10px;
  transition: width 0.3s;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 活动时间线 */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 4px;
}

.activity-tl-item {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
}

.activity-tl-item:last-child {
  padding-bottom: 0;
}

.tl-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #D1D5DB;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #9CA3AF;
  flex-shrink: 0;
  z-index: 1;
}

.activity-tl-item.done .tl-dot {
  background: #10B981;
  border-color: #10B981;
  color: #fff;
}

.activity-tl-item::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: #E5E7EB;
}

.activity-tl-item:last-child::after {
  display: none;
}

.activity-tl-item.done::after {
  background: #10B981;
}

.tl-content {
  flex: 1;
  padding-top: 1px;
}

.tl-time {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  font-family: monospace;
}

.tl-event {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.material-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #F9FAFB;
  border-radius: 8px;
  font-size: 13px;
}

.checklist-item.done {
  background: #ECFDF5;
}

.check-icon {
  font-size: 14px;
  color: #9CA3AF;
  width: 18px;
  text-align: center;
}

.checklist-item.done .check-icon {
  color: #10B981;
  font-weight: 700;
}

.checklist-item span:nth-child(2) {
  flex: 1;
}

.check-status {
  font-size: 12px;
  color: var(--text-secondary);
}

.checklist-item.done .check-status {
  color: #10B981;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-item {
  display: flex;
  gap: 14px;
  padding: 10px 14px;
  background: #F9FAFB;
  border-radius: 8px;
}

.record-time {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.record-content {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.record-person {
  color: var(--primary);
  font-weight: 500;
}

.risk-box {
  padding: 12px 16px;
  background: #FEF2F2;
  border-radius: 8px;
  color: #DC2626;
  font-size: 13px;
  line-height: 1.6;
}

/* ========== 投诉工单 ========== */
.stat-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.stat-cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 1200px) {
  .stat-cards-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .stat-cards-row { grid-template-columns: 1fr; }
}
.stat-cards-row .stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #E5E7EB;
  transition: box-shadow 0.2s;
  border-left: 4px solid #2B7FFF;
}
.stat-cards-row .stat-card:hover {
  box-shadow: 0 4px 12px rgba(43, 127, 255, 0.15);
}
.stat-cards-row .stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #EEF3FF;
  flex-shrink: 0;
}
.stat-cards-row .stat-card-info {
  flex: 1;
  min-width: 0;
}
.stat-cards-row .stat-card-value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: #1F2937;
}
.stat-cards-row .stat-card-label {
  font-size: 13px;
  color: #6B7280;
  margin-top: 4px;
}
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #E5E7EB;
}
.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.stat-card-value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}
.stat-card-label {
  font-size: 13px;
  color: #6B7280;
  margin-top: 4px;
}

.filter-bar {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #E5E7EB;
}
.filter-items {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-items:last-child { margin-bottom: 0; }
.filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.filter-item label {
  color: #4B5563;
  white-space: nowrap;
  font-size: 13px;
}
.filter-range-sep {
  color: #9CA3AF;
  font-size: 12px;
}
.input-date {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}

.reason-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.status-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-text {
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}
.link-text:hover {
  text-decoration: underline;
}
.row-overtime {
  background: #FEF2F2 !important;
}
.overtime-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 3px;
  background: #EF4444;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
}

/* 工单详情弹窗 */
.ticket-detail-modal {
  width: 900px;
  max-width: 90vw;
}
.ticket-detail-body {
  display: flex;
  gap: 24px;
  max-height: 60vh;
  overflow-y: auto;
}
.ticket-detail-left {
  flex: 0 0 340px;
  border-right: 1px solid #E5E7EB;
  padding-right: 24px;
}
.ticket-detail-right {
  flex: 1;
  min-width: 0;
}
.detail-section {
  margin-bottom: 20px;
}
.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F3F4F6;
}
.detail-row {
  display: flex;
  margin-bottom: 10px;
  font-size: 13px;
}
.detail-label {
  flex: 0 0 90px;
  color: #6B7280;
}
.detail-value {
  flex: 1;
  color: #111827;
  word-break: break-all;
}
.detail-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
  background: #F9FAFB;
  padding: 12px;
  border-radius: 6px;
}
.detail-attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 8px;
}
.timeline-item {
  position: relative;
  padding-left: 36px;
  padding-bottom: 20px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: #E5E7EB;
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #DBEAFE;
}
.timeline-content {
  background: #F9FAFB;
  border-radius: 8px;
  padding: 12px 14px;
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.timeline-title {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
}
.timeline-operator {
  font-size: 12px;
  color: #6B7280;
}
.timeline-text {
  font-size: 13px;
  color: #4B5563;
  line-height: 1.5;
  margin-bottom: 6px;
}
.timeline-time {
  font-size: 12px;
  color: #9CA3AF;
}

/* 表单 */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-item-full {
  grid-column: 1 / -1;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}
.form-label.required::before {
  content: '*';
  color: #EF4444;
  margin-right: 3px;
}
.input-textarea {
  width: 100%;
  min-height: 80px;
  padding: 8px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.input-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-hint {
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 4px;
  text-align: right;
}
.input-disabled {
  background: #F3F4F6;
  color: #6B7280;
  cursor: not-allowed;
}

/* 班群搜索下拉 */
.group-search-wrap {
  position: relative;
}
.group-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.group-dropdown-item {
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid #F3F4F6;
}
.group-dropdown-item:hover,
.group-dropdown-item.active {
  background: #EFF6FF;
}
.group-item-name {
  color: #111827;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-item-province {
  color: #9CA3AF;
  font-size: 12px;
  flex-shrink: 0;
}
.dropdown-empty {
  padding: 20px;
  text-align: center;
  color: #9CA3AF;
  font-size: 13px;
}

/* 附件 */
.attachment-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #F3F4F6;
  border-radius: 4px;
  font-size: 12px;
  color: #374151;
}
.attachment-size {
  color: #9CA3AF;
}
.attachment-del {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.attachment-del:hover { color: #EF4444; }
.attachment-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100px;
  height: 60px;
  border: 1px dashed #D1D5DB;
  border-radius: 4px;
  cursor: pointer;
  color: #6B7280;
}
.attachment-upload:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ========== 消息铃铛 ========== */
.msg-bell-wrap {
  position: relative;
  margin-right: 8px;
}
.msg-bell-icon {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4B5563;
  border-radius: 50%;
}
.msg-bell-icon:hover {
  background: #F3F4F6;
  color: var(--primary);
}
.msg-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  box-sizing: border-box;
}
.msg-dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border: 1px solid #E5E7EB;
  z-index: 1000;
  overflow: hidden;
}
.msg-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #F3F4F6;
}
.msg-dropdown-title {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}
.msg-dropdown-markall {
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
}
.msg-dropdown-list {
  max-height: 360px;
  overflow-y: auto;
}
.msg-dropdown-item {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid #F9FAFB;
}
.msg-dropdown-item:hover {
  background: #F9FAFB;
}
.msg-dropdown-item.unread {
  background: #EFF6FF;
}
.msg-item-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.msg-item-content {
  flex: 1;
  min-width: 0;
}
.msg-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.msg-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #EF4444;
  flex-shrink: 0;
}
.msg-type-tag {
  font-size: 10px;
  padding: 0 6px;
  border-radius: 3px;
  font-weight: 500;
}
.msg-type-ticket { background: #DBEAFE; color: #1D4ED8; }
.msg-type-system { background: #FEE2E2; color: #DC2626; }
.msg-item-desc {
  font-size: 12px;
  color: #6B7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}
.msg-item-time {
  font-size: 11px;
  color: #9CA3AF;
}
.msg-dropdown-footer {
  padding: 10px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  border-top: 1px solid #F3F4F6;
}
.msg-dropdown-footer:hover {
  background: #F9FAFB;
}
.msg-empty {
  padding: 40px 20px;
  text-align: center;
  color: #9CA3AF;
  font-size: 13px;
}

/* 消息中心 */
.msg-center-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #E5E7EB;
}
.msg-tabs-left {
  display: flex;
  gap: 0;
}
.msg-tab {
  padding: 8px 16px;
  font-size: 13px;
  color: #6B7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -12px;
}
.msg-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 500;
}
.msg-tabs-right {
  display: flex;
  gap: 10px;
  align-items: center;
}
.msg-center-list {
  padding: 8px 0;
}
.msg-center-item {
  display: flex;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid #F3F4F6;
  align-items: flex-start;
}
.msg-center-item:hover {
  background: #F9FAFB;
}
.msg-center-item.unread {
  background: #F8FAFF;
}
.msg-center-item .msg-item-content {
  flex: 1;
}
.msg-center-item .msg-item-title {
  font-size: 14px;
  margin-bottom: 6px;
}
.msg-center-item .msg-item-desc {
  font-size: 13px;
  white-space: normal;
  line-height: 1.5;
  margin-bottom: 6px;
  color: #4B5563;
}
.msg-center-item .msg-item-time {
  font-size: 12px;
}
.msg-item-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  padding-top: 2px;
}
.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: #EF4444; }

/* 消息中心Tab栏 */
.msg-tabs-bar {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  border-bottom: 1px solid #E5E7EB;
  align-items: center;
}
.msg-tab-item {
  position: relative;
  padding: 14px 16px;
  font-size: 14px;
  color: #6B7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.msg-tab-item:hover {
  color: var(--primary);
}
.msg-tab-item.active {
  color: var(--primary);
}
.msg-tab-item.active::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}
.msg-tab-count {
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #E5E7EB;
  color: #6B7280;
  font-weight: 400;
}
.msg-tab-item.active .msg-tab-count {
  background: rgba(43, 127, 255, 0.1);
  color: var(--primary);
}

.btn-success {
  background: #10B981;
  color: #fff;
  border: 1px solid #10B981;
}
.btn-success:hover { background: #059669; border-color: #059669; }
.btn-danger {
  background: #EF4444;
  color: #fff;
  border: 1px solid #EF4444;
}
.btn-danger:hover { background: #DC2626; border-color: #DC2626; }

.table-empty {
  text-align: center;
  padding: 40px;
  color: #9CA3AF;
  font-size: 13px;
}

.table-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
