/* 课程报名CRM样式 - 微信风格 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green: #3C6BF4;
  --green-hover: #3458D0;
  --green-light: rgba(60, 107, 244, 0.08);
  --red: #FA5151;
  --orange: #FF9500;
  --blue: #1989FA;
  --text-primary: #333;
  --text-secondary: #666;
  --text-placeholder: #C8C8C8;
  --text-disabled: #999;
  --bg-page: #F7F7F7;
  --bg-card: #FFFFFF;
  --border-color: #E5E5E5;
  --border-light: #F0F0F0;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background-color: var(--bg-page);
  line-height: 1.6;
}

/* ========== 通用组件 ========== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  gap: 6px;
  text-decoration: none;
}

.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background-color: var(--green);
  color: #fff;
}
.btn-primary:hover { background-color: var(--green-hover); }

.btn-default {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-default:hover { background-color: var(--bg-page); }

.btn-danger {
  background-color: var(--red);
  color: #fff;
}

.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
  padding: 12px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--green);
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
}
.btn-text:hover { text-decoration: underline; }

.btn-text.danger { color: var(--red); }

/* 表单 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.required { color: var(--red); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.2s;
  background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-light);
}

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

.form-row {
  display: flex;
  gap: 16px;
}

.flex-1 { flex: 1; }

/* 开关组件 */
.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch-label input { display: none; }

.switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: #E5E5E5;
  border-radius: 12px;
  transition: background-color 0.2s;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}

.switch-label input:checked + .switch-track {
  background-color: var(--green);
}

.switch-label input:checked + .switch-track .switch-thumb {
  transform: translateX(20px);
}

.switch-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 卡片 */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

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

.tag-success { background-color: var(--green-light); color: var(--green); }
.tag-warning { background-color: #FFF7E6; color: var(--orange); }
.tag-danger { background-color: #FFF1F0; color: var(--red); }
.tag-info { background-color: #E6F7FF; color: var(--blue); }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-disabled);
}

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

/* ========== 登录页 ========== */

.page { display: none; }
.page.active { display: block; }

.login-container {
  min-height: 100vh;
  display: flex;
  background: #F5F7FA;
}

/* 右侧登录区 */
.login-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card {
  width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.08);
}

.login-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-card-header .brand-logo {
  margin-bottom: 12px;
}

.login-card-header .brand-logo img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(60,107,244,0.2);
}

.login-card-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.login-card-header p {
  font-size: 13px;
  color: #999;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
  border-color: #3C6BF4;
  box-shadow: 0 0 0 3px rgba(60,107,244,0.1);
}

.login-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #ccc;
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #eee;
}

.login-divider span {
  padding: 0 12px;
}

/* 扫码登录 */
.qr-code-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  margin-bottom: 8px;
}

.qr-placeholder {
  font-size: 14px;
  color: var(--text-disabled);
}

.qr-status {
  text-align: center;
}

.qr-tip {
  font-size: 14px;
  color: var(--text-secondary);
}

.scan-result {
  width: 380px;
  background-color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.scan-result-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.scan-result-text {
  font-size: 15px;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* ========== 主界面 ========== */

.top-nav {
  height: 56px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: middle; }

.nav-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.main-layout {
  display: flex;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
}

/* 侧边栏 */
.sidebar {
  width: 200px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: 16px 0;
  position: fixed;
  top: 56px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background-color: var(--bg-page);
  color: var(--text-primary);
}

.menu-item.active {
  color: var(--green);
  background-color: var(--green-light);
  border-left-color: var(--green);
  font-weight: 500;
}

.menu-icon { font-size: 18px; }

/* 子菜单 */
.menu-parent {
  justify-content: space-between !important;
}

.menu-arrow {
  font-size: 16px;
  transition: transform 0.2s;
  color: var(--text-secondary);
  margin-left: auto;
}

.menu-parent.expanded .menu-arrow {
  transform: rotate(90deg);
}

.menu-sub {
  display: none;
  background-color: var(--bg-page);
}

.menu-sub.open {
  display: block;
}

.menu-child {
  padding-left: 0 !important;
  font-size: 13px;
  justify-content: center !important;
}

.menu-child.active {
  color: var(--green);
  background-color: var(--green-light);
  border-left-color: var(--green);
}

/* 内容区域 */
.content-area {
  flex: 1;
  margin-left: 200px;
  padding: 24px;
}

.content-page { display: none; }
.content-page.active { display: block; }

.page-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}

/* 管理员可见元素 - 默认隐藏 */
.admin-only {
  display: none !important;
}

body.is-admin .admin-only {
  display: inline-flex !important;
}

/* 数据表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.data-table th {
  background-color: #FAFAFA;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.data-table tr:hover td {
  background-color: #FAFAFA;
}

.table-actions {
  display: flex;
  gap: 8px;
}

/* 业绩归属标签 */
.performance-owner-tag {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  color: #3C6BF4;
  font-size: 12px;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #C7D2FE;
  max-width: 200px;
  white-space: normal;
  line-height: 1.6;
}

.performance-owner-tag:hover {
  background: linear-gradient(135deg, #3C6BF4 0%, #5B7CF5 100%);
  color: #fff;
  border-color: #3C6BF4;
  box-shadow: 0 2px 8px rgba(60, 107, 244, 0.25);
}

.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  color: #3C6BF4;
  font-size: 12px;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #C7D2FE;
  flex-wrap: wrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-tag:hover {
  background: linear-gradient(135deg, #3C6BF4 0%, #5B7CF5 100%);
  color: #fff;
  border-color: #3C6BF4;
  box-shadow: 0 2px 8px rgba(60, 107, 244, 0.25);
}

.source-tag-empty {
  background: #f9f9f9;
  color: #ccc;
  border-color: #e5e5e5;
}

.source-tag-empty:hover {
  background: #f0f0f0;
  color: #999;
  border-color: #ddd;
  box-shadow: none;
}

.performance-owner-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 8px;
}

.performance-owner-item select {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.performance-owner-item .percent-input {
  width: 80px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.performance-owner-item .percent-symbol {
  color: #666;
  font-size: 14px;
}

.performance-owner-item .remove-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: #ff4d4f;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.performance-owner-item .remove-btn:hover {
  background: #ff7875;
}

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

.filter-bar select {
  padding: 0 32px 0 12px;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  background-color: #FAFAFA;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  height: 28px;
  line-height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-bar select:hover {
  border-color: #D0D0D0;
  background-color: #fff;
}

.filter-bar select:focus {
  outline: none;
  border-color: var(--green);
  background-color: #fff;
  box-shadow: 0 0 0 3px var(--green-light);
}

/* 筛选栏日期输入框 */
.filter-bar input[type="date"] {
  padding: 0 8px;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  background-color: #FAFAFA;
  cursor: pointer;
  transition: all 0.2s;
  height: 28px;
  line-height: 28px;
  box-sizing: border-box;
  font-family: inherit;
}

.filter-bar input[type="date"]:hover {
  border-color: #D0D0D0;
  background-color: #fff;
}

.filter-bar input[type="date"]:focus {
  outline: none;
  border-color: var(--green);
  background-color: #fff;
  box-shadow: 0 0 0 3px var(--green-light);
}

.filter-bar input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  margin-left: 4px;
}

.filter-bar input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.8;
}

/* 统计标签 */
.stat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f5f5f5;
  border-radius: 12px;
  font-size: 12px;
  color: #555;
  white-space: nowrap;
}

.stat-tag strong {
  color: #333;
  font-weight: 600;
}

.stat-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 日期范围筛选 */
/* 日期筛选 */
.date-range-filter {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: #FAFAFA;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  height: 28px;
}

.date-range-filter:hover {
  border-color: #D0D0D0;
  background: #fff;
}

.date-range-filter:focus-within {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px var(--green-light);
}

.date-range-label {
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
  padding: 0 10px;
  border-right: 1px solid #E8E8E8;
  height: 100%;
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.015);
}

.date-range-sep {
  color: #C0C0C0;
  font-size: 12px;
  padding: 0 6px;
  line-height: 1;
}

.date-range-filter input[type="date"] {
  padding: 0 8px;
  border: none;
  border-radius: 0;
  font-size: 13px;
  color: var(--text-primary);
  background-color: transparent;
  cursor: pointer;
  line-height: 28px;
  min-width: 110px;
}

.date-range-filter input[type="date"]:focus {
  outline: none;
  box-shadow: none;
}

.date-range-filter input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  margin-left: 2px;
}

.date-range-filter input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.8;
}

.date-range-filter .clear-date-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  border: none;
  background: none;
  cursor: pointer;
  color: #C0C0C0;
  font-size: 11px;
  transition: all 0.15s;
  border-left: 1px solid #E8E8E8;
  flex-shrink: 0;
}

.date-range-filter .clear-date-btn:hover {
  color: var(--red);
  background: #FFF1F0;
}

/* 搜索框 */
.search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #FAFAFA;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  padding: 0 10px;
  height: 28px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.search-box:hover {
  border-color: #D0D0D0;
  background: #fff;
}
.search-box:focus-within {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px var(--green-light);
}
.search-box .search-icon {
  flex-shrink: 0;
  color: #999;
  margin-right: 6px;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-primary);
  padding: 0;
  width: 160px;
  height: 100%;
}
.search-box input::placeholder {
  color: #BBB;
}

/* 二维码表格辅助 */
.td-price {
  color: var(--red);
  font-weight: 600;
}

.td-qr {
  width: 60px;
  padding: 12px 16px !important;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
}

.td-qr canvas,
.td-qr img {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 4px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.td-qr:hover canvas,
.td-qr:hover img {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 二维码预览弹窗 */
#qr-modal-content img {
  border-radius: 8px;
}

.qrcode-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qrcode-dl-btn svg {
  flex-shrink: 0;
}

/* ========== 弹窗 ========== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.45);
}

.modal-content {
  position: relative;
  margin: 40px auto;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: auto;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease-out;
}

.modal-lg { max-width: 800px; }
.modal-xl {
  max-width: 640px;
  width: 100%;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-xl .modal-body {
  flex: 1;
  overflow-y: auto;
  max-height: none;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 20px;
  color: var(--text-disabled);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background-color: var(--bg-page); }

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

/* 多图上传 */
.tip-text {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-disabled);
}

.multi-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 120px;
  transition: border-color 0.2s;
}

.multi-upload-area:hover {
  border-color: var(--green);
}

.image-list-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.image-item-upload {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  cursor: grab;
  transition: box-shadow 0.2s, transform 0.15s;
}

.image-item-upload:hover {
  box-shadow: var(--shadow-md);
}

.image-item-upload.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.image-item-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-item-upload .cover-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 500;
}

.image-item-upload .delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  line-height: 1;
}

.image-item-upload:hover .delete-btn {
  opacity: 1;
}

.upload-add-btn {
  width: 140px;
  height: 140px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  color: var(--text-disabled);
}

.upload-add-btn:hover {
  border-color: var(--green);
  background-color: var(--green-light);
  color: var(--green);
}

.upload-add-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 4px;
}

.upload-add-text {
  font-size: 12px;
}

/* 设置页 */
.settings-section {
  margin-bottom: 32px;
}

.settings-section:last-child { margin-bottom: 0; }

.settings-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.settings-desc {
  font-size: 13px;
  color: var(--text-disabled);
  margin-bottom: 20px;
}

/* 类目管理 */
.category-manager {
  max-width: 500px;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 36px;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--green-light);
  color: var(--green);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.category-tag .tag-delete {
  width: 18px;
  height: 18px;
  border: none;
  background: rgba(60, 107, 244, 0.2);
  color: var(--green);
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s;
}

.category-tag .tag-delete:hover {
  background: var(--red);
  color: #fff;
}

.category-add {
  display: flex;
  gap: 10px;
}

.category-add input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: border-color 0.2s;
}

.category-add input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-light);
}

/* ========== Toast 提示 ========== */

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0,0,0,0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 9999;
  animation: fadeInOut 2s ease-out;
  pointer-events: none;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  15% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

/* ========== 响应式 ========== */

@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar .menu-item span:last-child { display: none; }
  .sidebar .menu-item { justify-content: center; padding: 14px 0; }
  .content-area { margin-left: 60px; }
  .form-row { flex-direction: column; gap: 0; }
  .modal-content { margin: 20px; }
  .modal-lg { max-width: 100%; }
}

/* ========== 收款报表 ========== */

.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

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

.status-success {
  background: #E6F7E6;
  color: #52C41A;
}

.status-warning {
  background: #FFF7E6;
  color: #FA8C16;
}

.status-danger {
  background: #FFF1F0;
  color: #F5222D;
}

.status-default {
  background: #F5F5F5;
  color: #666;
}

/* 响应式：统计卡片 */
@media (max-width: 1024px) {
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stats-cards {
    grid-template-columns: 1fr;
  }
}

/* 课程拖拽排序 */
.sort-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: grab;
  transition: box-shadow 0.15s, border-color 0.15s;
  user-select: none;
}
.sort-item:hover {
  border-color: #3C6BF4;
  box-shadow: 0 2px 8px rgba(60, 107, 244, 0.1);
}
.sort-item:active {
  cursor: grabbing;
}
.sort-item[draggable="true"]:active {
  opacity: 0.8;
}
.sort-drag-handle {
  font-size: 18px;
  color: #bbb;
  flex-shrink: 0;
  cursor: grab;
}
.sort-item-info {
  flex: 1;
  min-width: 0;
}
.sort-item-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 多师资编辑器（每位老师含视频和图片） */
.teachers-editor-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.teacher-row {
  position: relative;
  padding: 12px;
  background: #f8f9fb;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
}
.teacher-row-header {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e5e5e5;
}
.teacher-row-title {
  font-size: 12px;
  font-weight: 600;
  color: #3C6BF4;
}
.teacher-row-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.teacher-row-left {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}
.teacher-row-media {
  flex: 1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.teacher-media-item {
  flex: 1;
  min-width: 200px;
}
.teacher-media-item label {
  display: block;
  font-size: 11px;
  color: #999;
  margin-bottom: 6px;
}
.teacher-row .form-group {
  margin: 0;
}
.teacher-row .form-group label {
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
}
.teacher-avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.teacher-avatar-wrap img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
}
.teacher-video-upload {
  cursor: pointer;
  background: #fff;
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  padding: 8px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.teacher-video-upload:hover {
  border-color: #3C6BF4;
}
.teacher-images-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #fff;
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  padding: 8px;
  min-height: 60px;
}
.teacher-images-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.teacher-img-item {
  position: relative;
  display: inline-block;
}
.teacher-img-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FF4D4F;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
}
.teacher-images-add {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f5f5f5;
}
.teacher-images-add:hover {
  background: #e8e8e8;
  color: #3C6BF4;
}
.teacher-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5e5e5;
  color: #999;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
}
.teacher-remove-btn:hover {
  background: #FF4D4F;
  border-color: #FF4D4F;
  color: #fff;
}
}
.teacher-remove-btn:hover {
  background: #fff1f0;
  border-color: #ff4d4f;
  color: #ff4d4f;
}
.upload-preview video {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
}
