/* ==========================================================
 * 全局样式
 * ========================================================== */

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background-color: var(--content-bg);
  -webkit-font-smoothing: antialiased;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* 页面容器 */
.page-container {
  padding: 20px;
}

/* 页面标题 */
.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
}

/* 功能说明卡片 */
.feature-desc-card {
  background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
  border-radius: var(--card-radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  border-left: 4px solid var(--color-primary);
}

.feature-desc-card .desc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feature-desc-card .desc-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* 卡片样式覆盖 */
.el-card {
  border-radius: var(--card-radius);
  border: none;
  box-shadow: var(--card-shadow);
}

.el-card__header {
  border-bottom: 1px solid var(--border-color-light);
  padding: 16px 20px;
}

.el-card__body {
  padding: 20px;
}

/* 按钮渐变 */
.btn-gradient {
  background: var(--color-primary-gradient);
  border: none;
  color: #fff;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-gradient:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* 搜索栏 */
.search-bar {
  background: #fff;
  padding: 16px 20px;
  border-radius: var(--card-radius);
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
}

/* 表格操作区 */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.table-toolbar-left {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.table-toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 状态标签 */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.status-tag.success {
  background: #ECFDF5;
  color: #059669;
}

.status-tag.warning {
  background: #FFFBEB;
  color: #D97706;
}

.status-tag.danger {
  background: #FEF2F2;
  color: #DC2626;
}

.status-tag.info {
  background: #EFF6FF;
  color: #2563EB;
}

.status-tag.gray {
  background: #F3F4F6;
  color: #6B7280;
}

.status-tag.primary {
  background: #F5F3FF;
  color: #7C3AED;
}

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

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  color: #d1d5db;
}

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

/* 统计卡片 */
.stat-card {
  border-radius: var(--card-radius);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stat-card .stat-label {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card .stat-unit {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.8;
  margin-left: 4px;
}

.stat-card .stat-trend {
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.9;
}

.stat-card .stat-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  opacity: 0.2;
}

/* 卡片标题 */
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--color-primary-gradient);
  border-radius: 2px;
}

/* 表格覆盖 */
.el-table {
  --el-table-header-bg-color: #FAFBFC;
  --el-table-header-text-color: #374151;
  font-size: 13px;
}

.el-table th {
  font-weight: 600 !important;
}

/* 分页区 */
.pagination-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* 表单弹窗 */
.modal-form .el-form-item {
  margin-bottom: 18px;
}

/* 开发中占位 */
.dev-placeholder {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 60px 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.dev-placeholder .dev-icon {
  font-size: 64px;
  color: #e5e7eb;
  margin-bottom: 16px;
}

.dev-placeholder .dev-title {
  font-size: 18px;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.dev-placeholder .dev-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* 弹性布局工具 */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 600; }
.text-sm { font-size: 12px; }
