/* ==================== 后台管理系统样式 ==================== */

#adminApp {
  display: none;
  width: 100%;
  height: 100vh;
}

#adminApp.active {
  display: block;
}

/* 登录页 */
.admin-login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1B3A6B 0%, #2563EB 100%);
}

.admin-login-box {
  width: 420px;
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.admin-login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.admin-login-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.admin-login-logo h2 {
  font-size: 22px;
  color: #1B3A6B;
  margin: 0 0 6px 0;
}

.admin-login-logo p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.admin-login-form .form-group {
  margin-bottom: 18px;
}

/* 主布局 */
.admin-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.admin-sidebar {
  width: 220px;
  background: #0F172A;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-side-logo {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-icon {
  font-size: 20px;
}

.admin-side-nav {
  flex: 1;
  padding: 16px 0;
}

.admin-side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  color: #94A3B8;
  border-left: 3px solid transparent;
}

.admin-side-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.admin-side-item.active {
  background: rgba(59, 130, 246, 0.1);
  color: #fff;
  border-left-color: #3B82F6;
}

.side-item-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.admin-side-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #3B82F6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.admin-username {
  font-size: 13px;
  font-weight: 500;
}

.admin-role {
  font-size: 11px;
  color: #64748B;
}

/* 主内容区 */
.admin-main {
  flex: 1;
  overflow-y: auto;
  background: #F1F5F9;
  padding: 24px;
}

.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.admin-page-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: #0F172A;
  margin: 0 0 4px 0;
}

.admin-page-header p {
  font-size: 13px;
  color: #64748B;
  margin: 0;
}

/* 卡片 */
.admin-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

/* 大统计卡片 */
.stat-cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.big-stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border-left: 4px solid #1B3A6B;
}

.big-stat-card.blue { border-left-color: #3B82F6; }
.big-stat-card.green { border-left-color: #10B981; }
.big-stat-card.orange { border-left-color: #F59E0B; }

.big-stat-num {
  font-size: 32px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.2;
}

.big-stat-label {
  font-size: 13px;
  color: #64748B;
  margin-top: 6px;
}

/* 图表行 */
.charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.chart-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.chart-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
  margin: 0 0 16px 0;
}

/* 筛选栏 */
.filter-bar-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar-row .form-input,
.filter-bar-row .form-select {
  height: 36px;
}

/* 表格 */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  background: #F8FAFC;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #E2E8F0;
  font-size: 12px;
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid #E2E8F0;
  color: #334155;
}

.admin-table tbody tr:hover {
  background: #F8FAFC;
}

.client-row {
  cursor: pointer;
}

.action-cell {
  display: flex;
  gap: 10px;
}

.link-btn {
  background: none;
  border: none;
  color: #3B82F6;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.link-btn:hover { text-decoration: underline; }

.link-btn.edit { color: #F59E0B; }
.link-btn.danger { color: #EF4444; }

/* 状态标签 */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-待跟进 { background: #FEF3C7; color: #92400E; }
.status-服务中 { background: #DBEAFE; color: #1E40AF; }
.status-已结案 { background: #D1FAE5; color: #065F46; }
.status-进行中 { background: #DBEAFE; color: #1E40AF; }
.status-已完成 { background: #D1FAE5; color: #065F46; }

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: #64748B;
}

.pagination button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: #fff;
  border-radius: 10px;
  width: 600px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-box.modal-lg {
  width: 800px;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #94A3B8;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: #475569; }

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 客户详情标签页 */
.client-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 20px;
}

.client-tab {
  padding: 10px 18px;
  cursor: pointer;
  font-size: 14px;
  color: #64748B;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.client-tab:hover {
  color: #1B3A6B;
}

.client-tab.active {
  color: #1B3A6B;
  font-weight: 600;
  border-bottom-color: #1B3A6B;
}

.client-tab-content {
  min-height: 300px;
}

/* 基本信息 */
.basic-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #E2E8F0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}

.info-item {
  display: flex;
  padding: 6px 0;
  font-size: 13px;
}

.info-label {
  color: #64748B;
  width: 120px;
  flex-shrink: 0;
}

.info-value {
  color: #0F172A;
  flex: 1;
}

/* 模块标签 */
.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-tag {
  padding: 4px 10px;
  background: #EFF6FF;
  color: #1E40AF;
  border-radius: 12px;
  font-size: 12px;
}

.module-tag em {
  font-style: normal;
  color: #64748B;
  font-size: 11px;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 6px;
  bottom: -14px;
  width: 2px;
  background: #E2E8F0;
}

.timeline-item:last-child::before {
  bottom: auto;
  height: 14px;
}

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3B82F6;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #3B82F6;
}

.timeline-content {
  background: #F8FAFC;
  border-radius: 8px;
  padding: 12px 16px;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.timeline-date {
  font-weight: 600;
  color: #0F172A;
  font-size: 13px;
}

.service-type-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  background: #DBEAFE;
  color: #1E40AF;
}

.service-type-badge.type-现场尽调 { background: #FEE2E2; color: #991B1B; }
.service-type-badge.type-电话沟通 { background: #DBEAFE; color: #1E40AF; }
.service-type-badge.type-方案汇报 { background: #D1FAE5; color: #065F46; }
.service-type-badge.type-培训辅导 { background: #FEF3C7; color: #92400E; }
.service-type-badge.type-回访 { background: #EDE9FE; color: #5B21B6; }
.service-type-badge.type-其他 { background: #F1F5F9; color: #475569; }

.timeline-meta {
  font-size: 12px;
  color: #64748B;
  margin-left: auto;
}

.timeline-body {
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
}

.timeline-actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

/* 方案卡片 */
.solution-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.solution-card {
  background: #F8FAFC;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #E2E8F0;
}

.solution-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.solution-title {
  font-weight: 600;
  color: #0F172A;
  font-size: 14px;
  flex: 1;
}

.pri-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.pri-badge.pri-red { background: #FEE2E2; color: #991B1B; }
.pri-badge.pri-yellow { background: #FEF3C7; color: #92400E; }
.pri-badge.pri-green { background: #D1FAE5; color: #065F46; }

.solution-body {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.solution-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #64748B;
  margin-bottom: 8px;
}

.solution-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px dashed #E2E8F0;
}

/* Logo预览 */
.logo-preview-box {
  width: 120px;
  height: 120px;
  border: 2px dashed #CBD5E1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8FAFC;
}

.logo-preview-box img {
  max-width: 100px;
  max-height: 100px;
}

/* 迷你进度条 */
.mini-progress {
  display: inline-block;
  width: 60px;
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  overflow: hidden;
}

.mini-fill {
  height: 100%;
  background: #3B82F6;
  border-radius: 3px;
}

/* 响应式 */
@media (max-width: 1200px) {
  .stat-cards-row { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .chart-card[style*="span 2"] { grid-column: span 1 !important; }
  .solution-list { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .admin-sidebar { width: 60px; }
  .admin-side-logo span:last-child,
  .admin-side-item span:last-child,
  .admin-user-info > div,
  .admin-side-footer .btn { display: none; }
  .stat-cards-row { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .filter-bar-row { flex-direction: column; align-items: stretch; }
}

/* ========== 方法论管理 ========== */
.admin-method-wrapper {
  display: flex;
  gap: 20px;
}

.admin-method-modules {
  width: 200px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  align-self: flex-start;
}

.admin-side-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  padding: 6px 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 8px;
}

.admin-method-mod-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #4b5563;
  transition: all .15s;
}

.admin-method-mod-item:hover {
  background: #f1f5f9;
  color: #1B3A6B;
}

.admin-method-mod-item.active {
  background: #eaf0ff;
  color: #1B3A6B;
  font-weight: 500;
}

.method-mod-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.admin-method-mod-item.active .method-mod-num {
  background: #1B3A6B;
  color: #fff;
}

.admin-method-content {
  flex: 1;
  min-width: 0;
}

.admin-method-header {
  background: #fff;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.admin-method-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 6px 0;
}

.admin-method-header p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}

.admin-method-section {
  background: #fff;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.admin-method-section h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 14px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.method-chapter-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.method-chapter-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
}

.method-chapter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.method-chapter-head strong {
  color: #1B3A6B;
  font-size: 14px;
}

.method-point-list {
  padding-left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.method-point-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: #f8fafc;
  border-radius: 4px;
  font-size: 13px;
  color: #4b5563;
}

.method-faq-list, .method-ref-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.method-faq-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 6px;
}

.method-faq-q {
  font-size: 13px;
  color: #374151;
}

.method-ref-row {
  display: grid;
  grid-template-columns: 2fr 1fr 100px;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 13px;
}

.method-ref-name { color: #1a1a2e; font-weight: 500; }
.method-ref-org { color: #6b7280; }
.method-ref-type {
  text-align: center;
  color: #1B3A6B;
  background: #eaf0ff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.empty-tip {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
  font-size: 13px;
}

.btn-link {
  background: none;
  border: none;
  padding: 2px 6px;
  font-size: 12px;
  color: #1B3A6B;
  cursor: pointer;
  text-decoration: none;
}

.btn-link:hover { color: #C41E3A; text-decoration: underline; }
.btn-link.danger { color: #C41E3A; }
.btn-link.danger:hover { color: #9b1b2d; }

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.tag-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #fef2f2;
  color: #C41E3A;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* 角色标签 */
.role-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}
.role-admin {
  background: #EDE9FE;
  color: #6D28D9;
}
.role-consultant {
  background: #DBEAFE;
  color: #1D4ED8;
}
.role-enterprise {
  background: #D1FAE5;
  color: #047857;
}

/* 状态点 */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.status-success {
  background: #10B981;
}
.status-danger {
  background: #EF4444;
}
.status-warning {
  background: #F59E0B;
}
}
.status-warning {
  background: #F59E0B;
}

/* 权限配置单选样式 */
.perm-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  background: #fff;
}
.perm-radio-label:hover {
  border-color: #C41E3A;
}
.perm-radio-label input[type="radio"] {
  margin: 0;
  accent-color: #C41E3A;
}
.perm-radio-label input[type="radio"]:checked + span {
  color: #C41E3A;
  font-weight: 500;
}
.perm-radio-label:has(input[type="radio"]:checked) {
  border-color: #C41E3A;
  background: #FEF2F2;
}

/* 登录页 Tabs */
.login-tabs {
  display: flex;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 24px;
}
.login-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
}
.login-tab:hover {
  color: var(--primary);
}
.login-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* 微信登录 */
.wechat-login-box {
  text-align: center;
}
.wechat-qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.wechat-qr-code {
  width: 200px;
  height: 200px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px;
  position: relative;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.wechat-qr-grid {
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  grid-template-rows: repeat(21, 1fr);
  width: 100%;
  height: 100%;
  gap: 0;
}
.wechat-qr-center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.qr-dot {
  background: #fff;
}
.qr-dot.filled {
  background: #111;
  border-radius: 1px;
}
.qr-dot.filled.finder {
  background: #000;
}
.wechat-scan-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #059669;
  margin-top: 12px;
}
.wechat-scan-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}
.wechat-login-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #10B981;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.wechat-login-btn:hover {
  background: #ECFDF5;
  transform: translateY(-2px);
}
.login-wechat-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 16px;
  color: var(--text-muted);
  font-size: 12px;
}
.login-wechat-divider::before,
.login-wechat-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #E2E8F0;
}
.login-wechat-divider span {
  padding: 0 12px;
}

/* 验证码输入组 */
.code-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.code-btn {
  white-space: nowrap;
  min-width: 110px;
}
.code-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 角色选择 */
.role-choose {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.role-choose:hover {
  border-color: var(--primary);
}
.role-choose:has(input:checked) {
  border-color: var(--primary);
  background: #FEF2F2;
}
.role-choose input[type="radio"] {
  accent-color: var(--primary);
}

/* 注册来源标签 */
.source-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.source-password {
  background: #DBEAFE;
  color: #1D4ED8;
}
.source-wechat {
  background: #D1FAE5;
  color: #047857;
}
.source-both {
  background: #FDE68A;
  color: #92400E;
}

/* 用户列表头像 */
.user-list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #475569;
  font-size: 14px;
  overflow: hidden;
}

/* 个人设置页面 */
.profile-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.profile-avatar-default {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C41E3A, #8B0000);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 600;
}
.profile-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 12px;
}
.profile-tab {
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
  margin-bottom: -13px;
  font-weight: 500;
  transition: all 0.2s;
}
.profile-tab:hover {
  color: var(--primary);
}
.profile-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.security-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #F1F5F9;
}
.security-item:last-child {
  border-bottom: none;
}
.bind-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.2s;
}
.bind-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(196,30,58,0.08);
}
.bind-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 响应式：登录页移动端 */
@media (max-width: 480px) {
  .admin-login-box {
    width: 100%;
    max-width: 360px;
    padding: 30px 20px;
  }
}

/* ====== 政策管理样式 ====== */
.policy-stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.policy-stat-card {
  padding: 18px 20px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.policy-stat-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}
.policy-stat-label {
  font-size: 13px;
  color: #6b7280;
}
.policy-stat-active .policy-stat-num { color: #16a34a; }
.policy-stat-active { border-left: 4px solid #22c55e; }
.policy-stat-expiring .policy-stat-num { color: #d97706; }
.policy-stat-expiring { border-left: 4px solid #f59e0b; }
.policy-stat-expired .policy-stat-num { color: #dc2626; }
.policy-stat-expired { border-left: 4px solid #ef4444; }
.policy-stat-total .policy-stat-num { color: #2563eb; }
.policy-stat-total { border-left: 4px solid #3b82f6; }

.policy-expire-alert {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 政策状态标签（与 implementation.css 同名，共用视觉） */
.policy-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.5;
  white-space: nowrap;
}
.policy-status-active { color: #16a34a; background: #dcfce7; }
.policy-status-expiring { color: #d97706; background: #fef3c7; }
.policy-status-expired { color: #dc2626; background: #fee2e2; }
.policy-status-archived { color: #6b7280; background: #f3f4f6; }

.policy-new-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.4;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

/* 表格行状态样式 */
.admin-table tbody tr.row-expired {
  opacity: 0.6;
  background: #fafafa;
}
.admin-table tbody tr.row-expired td {
  color: #6b7280;
  text-decoration: line-through;
  text-decoration-color: #e5e7eb;
}
.admin-table tbody tr.row-expiring {
  background: #fffbeb;
}

.btn-danger {
  color: #dc2626;
  border-color: #fecaca;
}
.btn-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

@media (max-width: 768px) {
  .policy-stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
