/* ==================== KOS企业部工作系统 - 专业版设计系统 ==================== */

/* ==================== Reset & Base ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 主色系 */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-subtle: #dbeafe;
  
  /* 功能色 */
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --info: #0891b2;
  --info-light: #ecfeff;

  /* 中性色 */
  --bg: #f1f5f9;
  --bg-alt: #e2e8f0;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* 侧边栏 */
  --sidebar-bg: #0f172a;
  --sidebar-bg-hover: #1e293b;
  --sidebar-active-bg: rgba(37, 99, 235, 0.15);
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #e2e8f0;
  --sidebar-accent: #3b82f6;

  /* 圆角 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);

  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition: 0.25s ease;
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== Layout ==================== */
#app { display: flex; min-height: 100vh; }

/* ==================== Sidebar - 专业深色侧边栏 ==================== */
.sidebar {
  width: 170px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 24px rgba(0,0,0,0.12);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-header {
  padding: 28px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(37,99,235,0.08) 0%, transparent 100%);
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1.2;
}

.logo-sub {
  font-size: 11px;
  color: var(--sidebar-text);
  display: block;
  margin-top: 4px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

/* 用户信息条 */
.user-bar {
  padding: 16px 20px;
  margin: 12px 14px 0;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
}

.user-name {
  color: #f1f5f9;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.user-role {
  color: var(--sidebar-accent);
  font-size: 11px;
  margin-top: 3px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* 导航菜单 */
.nav-menu { padding: 16px 12px; flex: 1; }

.nav-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #cbd5e1;
  padding: 16px 12px 8px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-radius: var(--radius-sm);
  margin: 2px 0;
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--sidebar-accent);
  border-radius: 0 2px 2px 0;
  transition: height var(--transition);
}

.nav-item:hover {
  background: var(--sidebar-bg-hover);
  color: var(--sidebar-text-active);
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: #ffffff;
  font-weight: 600;
}
.nav-item.active::before { height: 20px; }

/* 侧边栏底部 */
.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}

/* ==================== Main Content ==================== */
.main-content {
  margin-left: 170px;
  flex: 1;
  padding: 28px 30px;
  max-width: calc(100vw - 170px);
  min-height: 100vh;
}

/* ==================== Page Header ==================== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 400;
}

/* ==================== Cards ==================== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 24px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

/* ==================== Stats Grid - 现代数据卡片 ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.04;
  transform: translate(30%, -30%);
}

.stat-card:nth-child(1)::after { background: var(--primary); }
.stat-card:nth-child(2)::after { background: var(--success); }
.stat-card:nth-child(3)::after { background: var(--warning); }
.stat-card:nth-child(4)::after { background: var(--danger); }
.stat-card:nth-child(5)::after { background: var(--info); }

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1.1;
}

.stat-value.blue { color: var(--primary); }
.stat-value.green { color: var(--success); }
.stat-value.red { color: var(--danger); }
.stat-value.orange { color: var(--warning); }

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* ==================== Tables ==================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--card-bg);
  border: 1px solid var(--border-light);
}
/* 横向滚动条 - 加粗加高，更易操作 */
.table-wrapper::-webkit-scrollbar { height: 18px; }
.table-wrapper::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 6px; border: 1px solid #cbd5e1; }
.table-wrapper::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 6px; border: 3px solid #e2e8f0; min-width: 40px; }
.table-wrapper::-webkit-scrollbar-thumb:hover { background: #64748b; }
.table-wrapper::-webkit-scrollbar-thumb:active { background: #475569; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

th {
  padding: 13px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12.5px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;          /* 全系统单元格横排，不竖向换行 */
}

tr:hover { background: #fafbfc; }
tr:last-child td { border-bottom: none; }

td a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
td a:hover { text-decoration: underline; }

/* ==================== Forms ==================== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: all var(--transition-fast);
  background: #ffffff;
  color: var(--text);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-input::placeholder { color: var(--text-muted); }

.form-textarea { resize: vertical; min-height: 72px; }

.form-inline {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.form-inline .form-group { margin-bottom: 0; }

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37,99,235,0.3);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 4px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 1px 2px rgba(5,150,105,0.3);
}
.btn-success:hover { background: #047857; transform: translateY(-1px); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 1px 2px rgba(220,38,38,0.3);
}
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }

.btn-warning {
  background: var(--warning);
  color: #fff;
  box-shadow: 0 1px 2px rgba(217,119,6,0.3);
}
.btn-warning:hover { background: #b45309; transform: translateY(-1px); }

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

.btn-group { display: flex; gap: 8px; }

/* ==================== Modal ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 92%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-lg { max-width: 960px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: var(--bg);
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.modal-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==================== Tabs ==================== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
  background: var(--card-bg);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0 4px;
}

.tab {
  padding: 11px 22px;
  border: none;
  background: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
  position: relative;
}
.tab:hover { color: var(--text); background: rgba(0,0,0,0.02); }
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

/* ==================== Pagination ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0;
  font-size: 13px;
}
.pagination .btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* ==================== Filters (高级感风格) ==================== */
.filters {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding: 18px 22px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  box-shadow: 0 2px 8px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
}
.filters .form-group { margin-bottom: 0; }
.filters .form-group .form-label {
  font-size: 12.5px;
  color: #4b5563;
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
  letter-spacing: .2px;
}
.filters .form-input,
.filters .form-select {
  font-size: 13.5px;
  border-color: #d1d9e6;
  border-radius: 8px;
  background: #fafbfc;
  padding: 8px 12px;
  transition: all .2s ease;
  min-width: 120px;
}
.filters .form-input:focus,
.filters .form-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  background: #fff;
  outline: none;
}
.filters button.btn {
  font-size: 13.5px;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  color: #fff;
  background: #4f46e5;
  border-color: #4f46e5;
  box-shadow: 0 1px 3px rgba(79,70,229,.25);
  transition: all .15s ease;
  min-width: 64px; /* 查询/重置等按钮宽度一致 */
}
.filters button.btn:hover { background: #4338ca; box-shadow: 0 2px 6px rgba(79,70,229,.35); }
/* 重置/次要操作按钮：白色底+边框，保持与主按钮同高 */
.filters button.btn.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: none;
}
.filters button.btn.btn-outline:hover { background: #eef2ff; box-shadow: none; }

/* ==================== Alerts ==================== */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }

/* ==================== Badges ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;          /* 文字不换行，始终横排 */
  max-width: none;             /* 不截断 */
}
.badge-new { background: var(--primary-subtle); color: var(--primary); }
.badge-old { background: var(--bg); color: var(--text-secondary); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }

/* ==================== Empty State ==================== */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}
.empty-state svg { margin-bottom: 16px; opacity: 0.25; }
.empty-state p { font-size: 15px; font-weight: 500; }

/* ==================== Quick Actions ==================== */
.quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* ==================== Monthly Grid (月度业绩) ==================== */
.monthly-grid-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-light); }

.monthly-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.monthly-grid th, .monthly-grid td {
  padding: 7px 12px;
  border: 1px solid #e8e8e8;
  text-align: center;
  min-width: 60px;
}
.monthly-grid .date-col { min-width: 90px; text-align: left; font-weight: 600; }
.monthly-grid .group-header { background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%); font-weight: 700; color: var(--primary); }
.monthly-grid .sub-header { background: #f0f4ff; font-weight: 600; }
.monthly-grid .data-cell { font-weight: 600; }

/* ==================== 月度业绩 - 按归属人分组卡片 ==================== */
.perf-owner { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 18px 20px; margin-bottom: 18px; }
.perf-owner-mine { border: 2px solid #6366f1; background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 60%); }
.perf-owner-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.perf-owner-head h3 { margin: 0; font-size: 17px; color: var(--text-primary); }
.perf-owner-title-block { flex: 1; }
.perf-encourage { margin: 4px 0 0; font-size: 13px; color: #6366f1; line-height: 1.5; opacity: 0.9; }
.perf-badge { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 12px; background: #eef2ff; color: #4338ca; }
.perf-badge-mine { background: #6366f1; color: #fff; }
.perf-combos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.perf-combo { border: 1px solid var(--border-light); border-radius: 8px; overflow: hidden; }
.perf-combo-title { background: #f0f4ff; padding: 8px 12px; font-weight: 600; }
.perf-line { color: var(--primary); }
.perf-doctor { color: var(--text-secondary); font-weight: 500; margin-left: 4px; }
.perf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.perf-table th, .perf-table td { padding: 8px 16px; border-bottom: 1px solid #eef0f4; text-align: left; }
.perf-table th.num, .perf-table td.num { text-align: right; }
.perf-table thead th { background: #fafbfc; font-weight: 600; color: var(--text-secondary); }
.perf-table tfoot td { font-weight: 700; background: #f7f9ff; border-top: 2px solid #e0e7ff; border-bottom: none; }

/* ==================== 月度业绩 - 主管按项目分组（可折叠） ==================== */
.perf-project { transition: box-shadow .15s ease; }
.perf-project-head { cursor: pointer; user-select: none; margin-bottom: 0; }
.perf-project-head:hover { background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%); border-radius: var(--radius-lg); }
.perf-project-head .collapse-icon { margin-left: auto; font-size: 16px; color: var(--text-secondary); transition: transform .15s ease; flex-shrink: 0; }
.perf-project-body { padding-top: 14px; }

/* 主管月度业绩 - 医生汇总表 */
.perf-doc-summary-table { width:100%; border-collapse:collapse; font-size:13.5px; margin-top:4px; }
.perf-doc-summary-table th { background:#fafbfc; font-weight:600; color:var(--text-secondary); padding:10px 16px; border-bottom:1px solid #eef0f4; text-align:left; }
.perf-doc-summary-table td { padding:11px 18px; border-bottom:1px solid #f0f2f5; }
.perf-doc-summary-table td.num { text-align:right; color:var(--text-primary); font-weight:600; font-variant-numeric:tabular-nums; }
.perf-doc-row:hover { background:#f8faff; cursor:default; }
.perf-doc-name { font-weight:600; color:var(--text-primary); white-space:nowrap; }
.perf-doc-toggle { display:inline-block; width:24px; height:24px; line-height:24px; text-align:center; cursor:pointer; color:var(--text-muted); font-size:12px; border-radius:4px; transition:background .15s; user-select:none; }
.perf-doc-toggle:hover { background:#e8ecff; color:var(--primary); }
.perf-doc-detail td { padding:0 !important; border-bottom:none !important; }
.perf-doc-detail-inner { padding:12px 16px; background:#fafbff; border-radius:0 0 var(--radius-md) var(--radius-md); border:1px solid #eef0f4; border-top:none; }
.perf-detail-table { font-size:12.5px; }

/* ==================== 登录页 - 全屏专业风格 ==================== */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

/* 背景装饰 */
.login-wrap::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
  top: -200px;
  right: -150px;
  animation: float 8s ease-in-out infinite;
}
.login-wrap::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

.login-card {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
  padding: 44px 40px;
  width: 400px;
  max-width: 92vw;
  position: relative;
  z-index: 1;
  animation: cardIn 0.5s ease;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 4px;
}
.login-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  text-align: center;
  font-weight: 400;
}
.login-tip {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 22px;
  text-align: center;
  font-weight: 500;
}

/* 登录输入框增强 */
.login-card .form-input {
  padding: 12px 16px;
  font-size: 15px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.login-card .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.login-card .btn-primary {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  margin-top: 8px;
  letter-spacing: 1px;
}
.login-demo { display: none; }

/* ==================== 账单余额卡片 ==================== */
.balance-card {
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.balance-positive {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
}
.balance-negative {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fecaca;
}
.balance-label { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.balance-value {
  font-size: 42px;
  font-weight: 800;
  margin: 8px 0;
  letter-spacing: -2px;
  line-height: 1;
}
.balance-positive .balance-value { color: var(--success); }
.balance-negative .balance-value { color: var(--danger); }
.balance-detail { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }

.bill-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .bill-cols { grid-template-columns: 1fr; } }
.bill-table th, .bill-table td { white-space: nowrap; }
.auto-row { background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%); }

/* ==================== 账单统计 - 逐成员卡片 ==================== */
.bill-member-card { border: 1px solid var(--border-light); border-radius: var(--radius-lg); margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.bm-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border-bottom: 1px solid var(--border-light); }
.bm-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.bm-role { font-size: 11px; color: #6366f1; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 10px; padding: 1px 8px; }
.bm-balance { margin-left: auto; font-size: 13px; font-weight: 600; }
.bm-balance.balance-positive { color: var(--success); }
.bm-balance.balance-negative { color: var(--danger); }
.bill-member-card .bill-cols { padding: 16px 18px; margin-bottom: 0; }

/* ==================== 账单统计 - 分发组业绩（主管，可折叠） ==================== */
.dg-wrap { display: flex; flex-direction: column; gap: 10px; }
.dg-group { border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; }
.dg-group-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%); transition: background .15s;
  user-select: none;
}
.dg-group-head:hover { background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%); }
.dg-caret { display: inline-block; width: 14px; color: var(--primary); font-size: 12px; transition: transform .15s; }
.dg-name { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.dg-sum { font-size: 12.5px; color: var(--text-secondary); margin-left: auto; text-align: right; line-height: 1.5; }
.dg-body { padding: 4px 16px 16px; background: #fff; }
.dg-table th, .dg-table td { font-size: 13px; padding: 10px 16px; }
.dg-up { color: #16a34a; font-weight: 700; }
.dg-mid { color: #d97706; font-weight: 700; }
.dg-down { color: #dc2626; font-weight: 700; }
@media (max-width: 768px) { .dg-sum { display: none; } }

/* ==================== 工作记录内联操作 ==================== */
.cell-input { padding: 8px 14px; font-size: 13px; height: 36px; border-radius: var(--radius-sm); }
/* 运营发布管理表格 — 加大单元格间距 */
#opsWorkTable td { padding: 13px 18px; vertical-align: middle; }
#opsWorkTable th { padding: 13px 18px; }
#opsWorkTable td .cell-input { margin-right: 5px; }
#opsWorkTable td .cell-input:last-child,
#opsWorkTable td > .cell-input:only-child { margin-right: 0; }
#opsWorkTable td:has(> .btn-primary) { padding-left: 20px; padding-right: 20px; }
.ops-work-actions { white-space: nowrap; }
.ops-work-actions .btn { margin-right: 8px; padding: 7px 16px; }
.ops-work-actions .btn:last-child { margin-right: 0; }

/* ==================== 杂项 ==================== */
.muted { color: var(--text-muted); }
.form-hint {
  background: var(--bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

/* ==================== Dashboard 分组标题 ==================== */
.dashboard-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dashboard-section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
  .sidebar { width: 68px; }
  .sidebar .nav-item span,
  .sidebar .nav-group-label,
  .sidebar .logo,
  .sidebar .logo-sub,
  .sidebar .user-bar,
  .sidebar .sidebar-footer { display: none; }
  .sidebar .nav-item { justify-content: center; padding: 14px; }
  .sidebar .sidebar-header { padding: 20px 0; text-align: center; }
  .main-content { margin-left: 68px; max-width: calc(100vw - 68px); padding: 24px 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 22px; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding: 16px; }
  .login-card { padding: 32px 24px; }
  .modal { padding: 20px; margin: 10px; }
}

/* ==================== 控评下单 - 评论条目编辑器（嵌套结构） ==================== */
.co-items { display: flex; flex-direction: column; gap: 10px; }
.co-comment-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; position: relative; }
.co-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comment-nick { font-weight: 700; color: #4f46e5; min-width: 44px; font-size: 13px; }
.comment-type-badge { font-size: 11px; background:#ede9fe;color:#7c3aed;padding:2px 8px;border-radius:10px;font-weight:600; }
.co-reply-badge { background:#fef3c7;color:#d97706; }
.co-del-btn { margin-left: auto !important; width: 26px; height: 26px; padding: 0; font-size: 15px; line-height: 1; border-radius: 50%; display:flex;align-items:center;justify-content:center; flex-shrink: 0; }
.co-content { flex: 1; min-width: 200px; font-size: 13px; }
.co-reply-btn { margin-top: 6px; font-size: 12px; color: #0369a1; border-color: #bae6fd; }
.co-reply-btn:hover { background: #e0f2fe; color: #0284c7; }
.co-add-btn { margin-top: 4px; font-size: 12.5px; border-style: dashed; }
/* 回复区域（缩进） */
.co-replies-box { margin-top: 8px; margin-left: 20px; padding-left: 14px; border-left: 3px solid #c7d2fe; border-radius: 0 6px 6px 0; display: flex; flex-direction: column; gap: 6px; background: #faf5ff; padding: 8px 10px; border-radius: 0 8px 8px 0; }
.co-reply-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.co-reply-nick { font-weight: 600; color: #7c3aed; min-width: 60px; font-size: 12px; }
.co-reply-content { min-width: 160px; font-size: 12.5px; }

/* ==================== 开关 toggle（是否完成） ==================== */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 24px; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--brand, #4f46e5); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ==================== 项目管理 ==================== */
.proj-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.proj-card { background: var(--card, #fff); border: 1px solid var(--border, #e3e8ef); border-radius: 12px; padding: 16px; }
.proj-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.proj-card-head h3 { margin: 0; font-size: 16px; }
.doc-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.doc-tag { display: inline-flex; align-items: center; gap: 4px; background: #eef2ff; color: #4338ca; border-radius: 14px; padding: 4px 10px; font-size: 13px; }
.doc-del { border: none; background: transparent; color: #4338ca; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.add-doc-box { display: flex; gap: 8px; }

/* ==================== 菜单顺序控制台 ==================== */
.menu-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.menu-sec { background: var(--card, #fff); border: 1px solid var(--border, #e3e8ef); border-radius: 12px; padding: 16px; }
.menu-sec-title { margin: 0 0 12px; font-size: 15px; color: var(--text-muted); }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-row { display: flex; justify-content: space-between; align-items: center; background: var(--bg-subtle, #f7f8fa); border: 1px solid var(--border, #e3e8ef); border-radius: 8px; padding: 8px 12px; }
.menu-label { font-weight: 500; }
.menu-btns { display: flex; gap: 6px; }

/* ==================== 成员分配 ==================== */
.assign-cell { min-width: 180px; max-width: 360px; word-break: break-all; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.assign-tag { display: inline-block; background: #eef2ff; color: #4338ca; border-radius: 12px; padding: 2px 8px; font-size: 12px; margin: 2px; }
.assign-pill { display: inline-flex; align-items: center; gap: 3px; background: #f0f4ff; color: #3730a3; border-radius: 6px; padding: 3px 10px; font-size: 12px; line-height: 1.6; border: 1px solid #c7d2fe; white-space: nowrap; }
.assign-pill b { color: #4338ca; font-weight: 600; }
.assign-proj { border: 1px solid var(--border, #e3e8ef); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.assign-proj-name { font-weight: 600; margin-bottom: 8px; }
.assign-doc-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.assign-doc { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 14px; }

/* ==================== 成员管理操作列 / 内联切换 ==================== */
.ops-cell { white-space: nowrap; min-width: 340px; }
.ops-cell .btn { margin: 2px 2px 2px 0; }
.clickable-dept, .clickable-group { background:#f8fafc; transition: background .15s; border-radius:6px; }
.clickable-dept:hover, .clickable-group:hover { background:#eef2ff; color:#4338ca; }
.clickable-dept::selection, .clickable-group::selection { background:transparent; }

/* ==================== 发布管理增强 ==================== */
.seq-badge { display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;background:#dbeafe;color:#1d4ed8;border-radius:6px;font-weight:700;font-size:12px; }
.link-cell { font-size:13px !important; min-width:450px !important; width:520px !important; max-width:600px !important; }
.link-cell-a { color:#2563eb;text-decoration:none;word-break:break-all;font-size:12px;max-width:180px;display:inline-block;line-height:1.4; }
.link-cell-a:hover { text-decoration:underline;color:#1d4ed8; }

/* ==================== 控评订单详情 - 卡片式布局 ==================== */
.co-detail-modal { max-width:600px; }

/* 卡片容器 */
.co-card {
  background: #fff; border: 1px solid #e8ecf2; border-radius: 12px;
  margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); overflow: hidden;
}
.co-card:last-child { margin-bottom: 0; }

/* 卡片标题栏 */
.co-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg,#f8fafc 0%,#f1f5f9 100%);
  border-bottom: 1px solid #e8ecf2;
}
.co-card-icon { font-size: 16px; }
.co-card-title { font-size: 14px; font-weight: 700; color: #334155; letter-spacing: .5px; }

/* 卡片内容区 */
.co-card-body { padding: 16px 18px; }

/* 基本信息两列网格 */
.co-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.co-info-item { display: flex; align-items: baseline; gap: 8px; }
.co-info-label { font-size: 12.5px; color: #64748b; font-weight: 600; min-width: 60px; flex-shrink: 0; }
.co-info-value { font-size: 13.5px; color: #1e293b; word-break: break-all; }
.co-order-no {
  font-family: 'SF Mono','Consolas',Monaco,monospace;
  font-weight: 700; color: #4f46e5; font-size: 13px; letter-spacing: .3px;
}

/* 空状态 */
.co-empty { color: #94a3b8; font-size: 13px; margin: 0; text-align: center; padding: 16px 0; }

/* 评论列表 */
.co-detail-comments { display:flex; flex-direction:column; gap:8px; }
.co-d-comment { display:flex; align-items:flex-start; gap:10px; padding:12px 14px; background:#fafbfc; border:1px solid #e8ecf2; border-radius:8px; }
.co-d-reply { display:flex; align-items:flex-start; gap:10px; padding:10px 14px 10px 28px; background:#f8fafc; border-left:3px solid #93c5fd; border-radius:0 8px 8px 0; margin-left:16px; }
.co-d-idx { font-size:11px; color:#94a3b8; font-weight:700; min-width:28px; height:22px; display:inline-flex; align-items:center; justify-content:center; background:#f1f5f9; border-radius:4px; flex-shrink:0; }
.co-d-text { font-size:13.5px; line-height:1.65; word-break:break-all; white-space:pre-wrap; }
.co-detail-copy { cursor:pointer;font-size:12px;color:#2563eb;background:#eff6ff;padding:2px 8px;border-radius:4px;white-space:nowrap; }
.co-detail-copy:hover { background:#dbeafe; }
.co-detail-link { color:#2563eb;text-decoration:none;word-break:break-all;font-size:13px;max-width:280px; }
.co-detail-link:hover { text-decoration:underline; }
.co-detail-comments { display:flex;flex-direction:column;gap:6px; }
.co-d-comment { display:flex;align-items:flex-start;gap:10px;padding:10px 14px;background:#ffffff;border:1px solid #e2e8f0;border-radius:8px; }
.co-d-reply { display:flex;align-items:flex-start;gap:10px;padding:8px 14px 8px 28px;background:#f8fafc;border-left:3px solid #93c5fd;border-radius:0 8px 8px 0;margin-left:16px; }
.co-d-idx { font-size:11px;color:#94a3b8;font-weight:700;min-width:28px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:#f1f5f9;border-radius:4px; }
.co-d-text { font-size:13.5px;line-height:1.6;word-break:break-all;white-space:pre-wrap; }
.co-detail-btn { font-size:12px !important; padding:5px 14px !important; border-radius:6px !important; transition:all .15s ease; }
.co-detail-btn:hover { background:#4f46e5 !important; color:#fff !important; border-color:#4f46e5 !important; }

/* 控评表格优化 — 统一间距与列宽 */
#orderTable td, #orderTable th,
#grabTable td, #grabTable th,
#manageTable td, #manageTable th {
  padding: 12px 18px;
}
#orderTable th, #grabTable th, #manageTable th {
  font-size: 12.5px; font-weight: 600; color: #4b5563; letter-spacing: .2px;
  border-bottom: 2px solid #e8ecf1;
}

/* 列宽：详情(窄居中) | 下单编号 | 推广项目/医生 | 评论数(窄居中) | 时间 | 操作 */
#grabTable th:nth-child(1), #grabTable td:nth-child(1),
#manageTable th:nth-child(1), #manageTable td:nth-child(1),
#orderTable th:nth-child(1), #orderTable td:nth-child(1)
{ width: 60px; text-align: center; }

#grabTable th:nth-child(3), #grabTable td:nth-child(3),
#manageTable th:nth-child(3), #manageTable td:nth-child(3),
#orderTable th:nth-child(3), #orderTable td:nth-child(3)
{ width: 120px; text-align: center; }

/* 推广项目 / 推广医生 — 给足够宽度 */
#grabTable th:nth-child(4), #grabTable td:nth-child(4),
#grabTable th:nth-child(5), #grabTable td:nth-child(5),
#manageTable th:nth-child(4), #manageTable td:nth-child(4),
#manageTable th:nth-child(5), #manageTable td:nth-child(5),
#orderTable th:nth-child(4), #orderTable td:nth-child(4),
#orderTable th:nth-child(5), #orderTable td:nth-child(5)
{ min-width: 100px; }

/* 发布平台 */
#grabTable th:nth-child(6), #grabTable td:nth-child(6),
#manageTable th:nth-child(4), #manageTable td:nth-child(4)
{ width: 90px; text-align: center; }

/* 评论数 — 居中紫色强调 */
#grabTable th:nth-child(7), #grabTable td:nth-child(7),
#manageTable th:nth-child(7), #manageTable td:nth-child(7),
#orderTable th:nth-child(8), #orderTable td:nth-child(8)
{ width: 68px; text-align: center; }
.co-count-cell { color: #4f46e5; font-weight: 600; font-size: 13.5px; }

/* 下单时间 / 接单时间 / 完成时间 */
#grabTable th:nth-child(8), #grabTable td:nth-child(8)
{ width: 155px; text-align: center; }
#manageTable th:nth-child(8), #manageTable td:nth-child(8),
#orderTable th:nth-child(9), #orderTable td:nth-child(9),
#orderTable th:nth-child(10), #orderTable td:nth-child(10),
#orderTable th:nth-child(11), #orderTable td:nth-child(11)
{ width: 155px; text-align: center; }

/* 操作列（grabTable最后是操作，orderTable最后是操作，但manageTable最后是截图需覆盖） */
#grabTable th:last-child, #grabTable td:last-child,
#orderTable th:last-child, #orderTable td:last-child
{ width: 80px; text-align: center; white-space: nowrap; }
/* manageTable 最后列=截图，给足够横向空间 */
#manageTable th:last-child, #manageTable td:last-child
{ min-width: 200px; width: auto; }

/* 控评管理 - 完成截图缩略图（横向单行排列） */
.shot-cell {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 280px;
  padding: 4px 0;
  /* 隐藏横向滚动条（仍可拖动/滚轮滑动） */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.shot-cell::-webkit-scrollbar { display: none; /* Chrome/Safari */ }
.shot-thumb-wrap { position:relative;display:inline-block;line-height:0;flex-shrink:0; }
.shot-thumb { width:44px;height:44px;object-fit:cover;border-radius:6px;border:1px solid #e2e8f0;cursor:pointer;transition:transform .12s ease; }
.shot-thumb:hover { transform:scale(1.06); }
.shot-del { position:absolute;top:-6px;right:-6px;width:18px;height:18px;line-height:16px;text-align:center;padding:0;border:none;border-radius:50%;background:#ef4444;color:#fff;font-size:12px;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.25); }
.shot-del:hover { background:#dc2626; }
.shot-upload-btn { font-size:12px !important;padding:5px 10px !important;white-space:nowrap;flex-shrink:0;border-radius:6px !important; }

/* 上传弹窗预览 */
.shot-preview-wrap { display:flex;flex-wrap:wrap;gap:10px;margin-top:10px;min-height:10px; }
.shot-preview-item { position:relative;line-height:0; }
.shot-preview-item .shot-thumb { width:72px;height:72px; }
.shot-preview-item .shot-del { top:-7px;right:-7px; }

/* 拖拽上传区域 */
.shot-drop-zone {
  position:relative;border:2px dashed #cbd5e1;border-radius:12px;
  padding:32px 20px;text-align:center;background:#f8fafc;
  transition:border-color .2s,background .2s;cursor:pointer;margin-bottom:4px;
}
.shot-drop-zone:hover { border-color:#94a3b8;background:#f1f5f9; }
.shot-drop-zone.shot-drop-active {
  border-color:#6366f1;background:#eef2ff;box-shadow:0 0 0 3px rgba(99,102,241,.15);
}
.shot-drop-icon { font-size:36px;margin-bottom:8px;opacity:.6; }
.shot-drop-hint { margin:0 0 4px;font-size:14px;color:#475569;font-weight:500; }
.shot-drop-sub { margin:0;font-size:12px;color:#94a3b8; }

/* 详情弹窗截图（卡片内） */
.co-detail-shots { display:flex;flex-wrap:wrap;gap:10px; }
.co-detail-shot { line-height:0; }
.co-detail-shot img { width:96px;height:96px;object-fit:cover;border-radius:8px;border:1px solid #e2e8f0;cursor:pointer;transition:transform .12s ease; }
.co-detail-shot img:hover { transform:scale(1.04); }

/* ==================== 工作总览 (Work Overview) ==================== */
.dash-loading { text-align:center;padding:40px;color:#94a3b8;font-size:14px; }

.wo-section { margin-bottom: 24px; }
.wo-section-head { display:flex;align-items:center;gap:8px;margin-bottom:14px; }
.wo-section-head h3 { font-size:15px;font-weight:700;color:#1e293b;margin:0; }
.wo-section-icon { font-size:18px; }

.wo-grid { display:grid; gap:14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.wo-grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.wo-grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.wo-grid-5 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.wo-grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* 进度条（保底线 / 目标线进度） */
.wo-progress-row { display:flex;align-items:center;gap:12px;margin-bottom:12px; }
.wo-progress-label { width:88px;font-size:13px;color:#475569;font-weight:600;flex-shrink:0; }
.wo-progress-bar { flex:1;height:14px;background:#eef2f7;border-radius:8px;overflow:hidden; }
.wo-progress-fill { height:100%;border-radius:8px;transition:width .4s ease;min-width:3px; }
.wo-progress-fill.wo-status-up { background:linear-gradient(90deg,#34d399,#059669); }
.wo-progress-fill.wo-status-down { background:linear-gradient(90deg,#fbbf24,#f59e0b); }
.wo-progress-val { width:90px;text-align:right;font-size:13px;font-weight:700;color:#0f172a;font-variant-numeric:tabular-nums;flex-shrink:0; }

.wo-card {
  background:#fff;border-radius:12px;padding:18px 20px;
  border:1px solid #f0f1f5;box-shadow:0 1px 3px rgba(0,0,0,.04);
  transition:transform .15s, box-shadow .15s;
}
.wo-card:hover { transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.08); }
.wo-card-label { font-size:12px;color:#64748b;font-weight:500;margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px; }
.wo-card-value { font-size:26px;font-weight:800;color:#0f172a;line-height:1.2; }
.wo-card-unit { font-size:13px;font-weight:500;color:#94a3b8;margin-left:2px; }
.wo-card-sub { font-size:11.5px;color:#94a3b8;margin-top:6px;font-weight:500; }

.wo-note { background:#fffbeb;border-radius:8px;padding:10px 16px;font-size:12.5px;color:#92400e;border:1px solid #fef3c7; }
.wo-table { width:100%;border-collapse:collapse; }
.wo-table th { padding:12px 18px;background:#f8fafc;font-size:12px;font-weight:600;color:#475569;text-align:left;border-bottom:2px solid #e2e8f0;white-space:nowrap; }
.wo-table td { padding:11px 18px;font-size:13px;border-bottom:1px solid #f1f5f9;vertical-align:middle; }
.wo-table tbody tr:hover { background:#fafbfd; }
.wo-table .num { text-align:right;font-variant-numeric:tabular-nums;font-weight:600; }
.wo-tier-table td:first-child, .wo-tier-table th:first-child { width:120px;text-align:center; }
.wo-tier-table td:nth-child(2), .wo-tier-table th:nth-child(2) { width:130px;text-align:center; }
.wo-tier-table td:nth-child(3), .wo-tier-table th:nth-child(3) { text-align:left; }

.wo-status-up { color:#059669; }
.wo-status-down { color:#dc2626; }
.wo-badge {
  display:inline-block;padding:2px 10px;border-radius:20px;font-size:11.5px;font-weight:700;
}
.wo-badge.wo-status-up { background:#d1fae5;color:#065f46; }
.wo-badge.wo-status-down { background:#fee2e2;color:#991b1b; }

.wo-bonus-calc {
  margin-top:14px;padding:12px 16px;background:#f0fdf4;border-radius:8px;
  border:1px solid #bbf7d0;font-size:13px;color:#166534;line-height:1.6;
}
.wo-bonus-calc strong { color:#15803d;font-size:15px; }

/* 工作总览 - 温暖欢迎横幅 */
.wo-welcome {
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 50%, #fff7ed 100%);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 22px;
  border: 1px solid #e0e7ff;
  position: relative;
  overflow: hidden;
}
.wo-welcome::before {
  content: '';
  position: absolute;
  top: -30px; right: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(99,102,241,.08) 0%, transparent 70%);
  border-radius: 50%;
}
.wo-welcome-greet { font-size: 17px; font-weight: 700; color: #312e81; margin-bottom: 6px; }
.wo-welcome-text { font-size: 13.5px; color: #475569; line-height: 1.8; }
.wo-welcome-text em { font-style: normal; color: #6366f1; font-weight: 600; }
.wo-welcome-highlight { display: inline-block; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; padding: 2px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; margin-top: 8px; }

/* ==================== 结账中心 ==================== */
.settle-hero {
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
  border: 1px solid #fecaca;
  border-left: 5px solid #ef4444;
  border-radius: 14px;
  padding: 22px 26px;
}
.settle-hero-label { font-size: 14px; color: #b91c1c; font-weight: 600; margin-bottom: 6px; }
.settle-hero-amount { font-size: 34px; font-weight: 800; color: #dc2626; letter-spacing: -.5px; }
.settle-hero-sub { margin-top: 10px; font-size: 13px; color: #7f1d1d; background: rgba(255,255,255,.6); padding: 8px 12px; border-radius: 8px; line-height: 1.7; }
.amt-unsettled { color: #dc2626; font-weight: 700; font-size: 15px; }
.amt-settled { color: #94a3b8; font-weight: 600; }
.settle-act { white-space: nowrap; }
.badge-settled { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.badge-unsettled { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.badge-partial { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.row-settled { background: #f0fdf4; }
.cell-settled { color: #16a34a; font-weight: 600; background: #f0fdf4; }
/* 发布管理：已结算金额输入框锁定（浅色只读） */
.settled-field { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; cursor: not-allowed; }

/* ===== 组长/主管 逐成员工作总览 ===== */
.mo-wrap{display:flex;flex-direction:column;gap:16px;}
.mo-bar{font-size:14px;font-weight:700;color:#1e293b;background:#eef2ff;border:1px solid #e0e7ff;padding:10px 14px;border-radius:10px;}
.mo-summary{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;}
@media(max-width:1100px){.mo-summary{grid-template-columns:repeat(3,1fr);}}
@media(max-width:680px){.mo-summary{grid-template-columns:repeat(2,1fr);}}
.mo-sum-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:12px 14px;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.mo-sum-label{font-size:12px;color:#64748b;margin-bottom:6px;}
.mo-sum-val{font-size:20px;font-weight:800;color:#1e293b;}

.mo-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;margin-bottom:14px;overflow:hidden;box-shadow:0 1px 3px rgba(15,23,42,.05);}
.mo-card-head{display:flex;align-items:center;gap:12px;padding:12px 16px;background:linear-gradient(90deg,#f8fafc,#f1f5f9);border-bottom:1px solid #eef2f7;}
.mo-avatar{width:38px;height:38px;border-radius:50%;background:#6366f1;color:#fff;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;flex:0 0 auto;}
.mo-card-meta{flex:1 1 auto;min-width:0;}
.mo-card-name{font-size:15px;font-weight:700;color:#1e293b;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.mo-card-sub{font-size:12px;color:#64748b;margin-top:2px;}
.mo-tag{font-size:11px;font-weight:700;padding:2px 9px;border-radius:10px;line-height:1.4;white-space:nowrap;}
.mo-tag-self{background:#dcfce7;color:#15803d;border:1px solid #bbf7d0;}
.mo-tag-member{background:#e0e7ff;color:#4338ca;border:1px solid #c7d2fe;}
.mo-toggle{margin-left:auto;flex:0 0 auto;background:#fff;border:1px solid #cbd5e1;color:#475569;font-size:12px;padding:5px 12px;border-radius:8px;cursor:pointer;}
.mo-toggle:hover{background:#f1f5f9;}
.mo-card-body{padding:14px 16px;}

/* 部门折叠分区 */
.dept-section{border:1px solid #e2e8f0;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.04);margin-bottom:14px;}
.dept-head{display:flex;align-items:center;gap:10px;padding:13px 16px;cursor:pointer;background:linear-gradient(90deg,#eef2ff,#f5f3ff);user-select:none;}
.dept-head:hover{background:#e6ebff;}
.dept-icon{font-size:18px;}
.dept-title{font-size:15px;font-weight:800;color:#1e293b;}
.dept-count{font-size:12px;color:#64748b;background:#fff;border:1px solid #e2e8f0;padding:2px 9px;border-radius:10px;}
.dept-arrow{margin-left:auto;font-size:16px;color:#6366f1;}
.dept-body{padding:14px 16px;}
.dept-section:not(.open) .dept-body{display:none;}

/* 新增成员：主管负责小组多选 */
.sup-groups-checklist { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; border: 1px solid var(--border, #e3e8ef); border-radius: 8px; padding: 10px; background: #fafbfc; }
.sup-group-check { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: background .15s; }
.sup-group-check:hover { background: #f0f4ff; }
.sup-group-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: #6366f1; }
.sup-group-check span { color: #334155; }

/* ==================== 博主登记 - Toggle 开关 ==================== */
.reg-toggle-cell { text-align: center; vertical-align: middle; }
.reg-toggle-wrap { display: flex; align-items: center; justify-content: center; min-height: 28px; }
.reg-switch {
  position: relative; display: inline-block;
  width: 44px; height: 24px; cursor: pointer;
  background: #cbd5e1; border-radius: 12px;
  transition: background 0.25s ease; flex-shrink: 0;
}
.reg-switch-on { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.reg-switch-knob {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.reg-switch-on .reg-switch-knob { transform: translateX(20px); }
.reg-switch:hover { opacity: 0.9; }
.reg-received-by { font-size: 13px; color: var(--text-primary); text-align: center; font-weight: 500; }
