/* 真人荷官视讯后台管理系统 V2.1 - 专业样式表 */

/* ========================================
   1. CSS 变量定义
   ======================================== */
:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;
  
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --header-height: 64px;
  
  --border-radius-sm: 6px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
}

/* ========================================
   2. 基础重置与全局样式
   ======================================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   3. 侧边栏导航
   ======================================== */
#sidebar {
  width: var(--sidebar-width);
  transition: width 0.3s ease;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
}

.nav-section {
  margin-bottom: var(--spacing-lg);
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
  padding: 0 var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 12px var(--spacing-md);
  border-radius: var(--border-radius);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
}

.nav-item i {
  width: 20px;
  font-size: 15px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.nav-badge-hot {
  background: #ef4444;
  color: #fff;
}

.nav-badge-new {
  background: #10b981;
  color: #fff;
}

/* ========================================
   4. 主内容区域
   ======================================== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

/* 顶部导航栏 */
.header {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-xl);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-title h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.header-title p {
  font-size: 13px;
  color: #6b7280;
  margin: 4px 0 0 0;
}

.header-user {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.header-user-info {
  text-align: right;
}

.header-user-info .name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.header-user-info .ip {
  font-size: 12px;
  color: #9ca3af;
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

/* 内容区 */
.content-area {
  flex: 1;
  padding: var(--spacing-xl);
  background: #f8fafc;
}

/* ========================================
   5. 卡片组件
   ======================================== */
.card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.card-header-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-header-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.card-header-title p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.card-body {
  padding: var(--spacing-xl);
}

.card-body-compact {
  padding: 0;
}

.card-footer {
  padding: var(--spacing-md) var(--spacing-xl);
  border-top: 1px solid #f3f4f6;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ========================================
   6. 统计卡片
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

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

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

.stat-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  border: 1px solid #e5e7eb;
  padding: var(--spacing-lg);
  transition: all 0.2s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-card-icon.blue {
  background: #eff6ff;
  color: #3b82f6;
}

.stat-card-icon.green {
  background: #ecfdf5;
  color: #10b981;
}

.stat-card-icon.purple {
  background: #f5f3ff;
  color: #8b5cf6;
}

.stat-card-icon.red {
  background: #fef2f2;
  color: #ef4444;
}

.stat-card-icon.yellow {
  background: #fffbeb;
  color: #f59e0b;
}

.stat-card-trend {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.stat-card-trend.up {
  background: #ecfdf5;
  color: #10b981;
}

.stat-card-trend.down {
  background: #fef2f2;
  color: #ef4444;
}

.stat-card-trend.neutral {
  background: #f3f4f6;
  color: #6b7280;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.stat-card-label {
  font-size: 13px;
  color: #6b7280;
}

/* ========================================
   7. 表格样式
   ======================================== */
.data-table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.data-table th {
  padding: 14px var(--spacing-lg);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  text-align: left;
  white-space: nowrap;
}

.data-table th.text-center {
  text-align: center;
}

.data-table th.text-right {
  text-align: right;
}

.data-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: #f9fafb;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table td {
  padding: 16px var(--spacing-lg);
  font-size: 14px;
  color: #374151;
  vertical-align: middle;
}

.data-table td.text-center {
  text-align: center;
}

.data-table td.text-right {
  text-align: right;
}

.data-table td.font-mono {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.data-table td.font-semibold {
  font-weight: 600;
}

/* 表格行特殊状态 */
.data-table tr.row-warning {
  background: #fffbeb;
}

.data-table tr.row-danger {
  background: #fef2f2;
}

.data-table tr.row-success {
  background: #ecfdf5;
}

/* ========================================
   8. 徽章/状态标签
   ======================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success {
  background: #ecfdf5;
  color: #059669;
}

.badge-warning {
  background: #fffbeb;
  color: #d97706;
}

.badge-danger {
  background: #fef2f2;
  color: #dc2626;
}

.badge-info {
  background: #eff6ff;
  color: #2563eb;
}

.badge-gray {
  background: #f3f4f6;
  color: #4b5563;
}

.badge-purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.badge-sm {
  padding: 2px 8px;
  font-size: 11px;
}

/* ========================================
   9. 按钮样式
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 10px var(--spacing-lg);
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-success {
  background: #10b981;
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: #059669;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-warning {
  background: #f59e0b;
  color: #fff;
}

.btn-warning:hover:not(:disabled) {
  background: #d97706;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

.btn-outline {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.btn-outline:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #d1d5db;
}

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

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

.btn-icon {
  padding: 8px;
  min-width: 36px;
}

/* ========================================
   10. 表单控件
   ======================================== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: var(--spacing-sm);
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px var(--spacing-md);
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius);
  font-size: 14px;
  color: #111827;
  background: #fff;
  transition: all 0.15s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input-icon {
  position: relative;
}

.form-input-icon .form-input {
  padding-left: 40px;
}

.form-input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.form-select {
  cursor: pointer;
}

/* ========================================
   11. 搜索和筛选栏
   ======================================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid #f3f4f6;
}

.filter-search {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  position: relative;
}

.filter-search input {
  padding-left: 40px;
}

.filter-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.filter-select {
  min-width: 140px;
}

.filter-actions {
  margin-left: auto;
  display: flex;
  gap: var(--spacing-sm);
}

/* ========================================
   12. 标签页
   ======================================== */
.tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 var(--spacing-xl);
  gap: var(--spacing-xl);
  overflow-x: auto;
}

.tab {
  padding: var(--spacing-md) 0;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.tab:hover {
  color: var(--primary-color);
}

.tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

.tab-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: #fef2f2;
  color: #dc2626;
}

/* ========================================
   13. 网格布局
   ======================================== */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1280px) {
  .grid-5 {
    grid-template-columns: repeat(4, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .grid-5,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-5,
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* 灵活间距 */
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

/* ========================================
   14. 空状态
   ======================================== */
.empty-state {
  padding: var(--spacing-2xl) var(--spacing-xl);
  text-align: center;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-lg);
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #9ca3af;
}

.empty-state-icon.success {
  background: #ecfdf5;
  color: #10b981;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: var(--spacing-sm);
}

.empty-state-text {
  font-size: 14px;
  color: #6b7280;
}

/* ========================================
   15. 加载状态
   ======================================== */
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   16. 分页
   ======================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.pagination-btn {
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius);
  font-size: 14px;
  color: #374151;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #d1d5db;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* ========================================
   17. 快捷操作按钮
   ======================================== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

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

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  gap: var(--spacing-sm);
}

.quick-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.quick-action-btn i {
  font-size: 24px;
}

.quick-action-btn span {
  font-size: 13px;
  font-weight: 600;
}

.quick-action-btn.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.quick-action-btn.red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.quick-action-btn.green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.quick-action-btn.yellow {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.quick-action-btn.purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* ========================================
   18. 信息卡片
   ======================================== */
.info-card {
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  transition: all 0.2s ease;
}

.info-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.info-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.info-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.info-card-body {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: var(--spacing-md);
}

.info-card-footer {
  border-top: 1px solid #f3f4f6;
  padding-top: var(--spacing-md);
}

.info-card-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
}

.info-card-row:last-child {
  margin-bottom: 0;
}

.info-card-row-label {
  color: #6b7280;
  font-size: 13px;
}

.info-card-row-value {
  font-weight: 600;
  color: #111827;
  font-size: 13px;
}

/* ========================================
   19. 警告卡片
   ======================================== */
.alert-card {
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.alert-card.warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

.alert-card.danger {
  background: #fef2f2;
  border: 1px solid #fca5a5;
}

.alert-card.success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
}

.alert-card.info {
  background: #eff6ff;
  border: 1px solid #93c5fd;
}

.alert-card-icon {
  flex-shrink: 0;
  font-size: 18px;
}

.alert-card.warning .alert-card-icon {
  color: #d97706;
}

.alert-card.danger .alert-card-icon {
  color: #dc2626;
}

.alert-card.success .alert-card-icon {
  color: #059669;
}

.alert-card.info .alert-card-icon {
  color: #2563eb;
}

.alert-card-content {
  flex: 1;
}

.alert-card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.alert-card-text {
  font-size: 13px;
  opacity: 0.9;
}

/* ========================================
   20. 实时状态指示器
   ======================================== */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #10b981;
}

.live-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   21. 头像组件
   ======================================== */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
}

.avatar-xl {
  width: 72px;
  height: 72px;
  font-size: 26px;
}

/* ========================================
   22. 图表容器
   ======================================== */
.chart-container {
  position: relative;
  height: 280px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.chart-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.chart-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.chart-action-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chart-action-btn.active {
  background: var(--primary-light);
  color: var(--primary-color);
}

.chart-action-btn:not(.active) {
  background: #f3f4f6;
  color: #6b7280;
}

.chart-action-btn:hover:not(.active) {
  background: #e5e7eb;
}

/* ========================================
   23. 通知提示
   ======================================== */
.notification {
  position: fixed;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--border-radius);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification.success {
  background: #10b981;
}

.notification.danger {
  background: #ef4444;
}

.notification.warning {
  background: #f59e0b;
}

.notification.info {
  background: #3b82f6;
}

/* ========================================
   24. 滚动条美化
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ========================================
   25. 响应式布局
   ======================================== */
@media (max-width: 1024px) {
  #sidebar {
    width: var(--sidebar-collapsed-width);
  }
  
  #sidebar .nav-item span,
  #sidebar .nav-badge,
  #sidebar .sidebar-header h1,
  #sidebar .sidebar-header p,
  #sidebar .nav-section-title {
    display: none;
  }
  
  #sidebar .nav-item {
    justify-content: center;
    padding: 12px;
  }
  
  #sidebar .nav-item i {
    margin: 0;
    font-size: 18px;
  }
  
  .main-content {
    margin-left: var(--sidebar-collapsed-width);
  }
  
  .content-area {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
  }
  
  #sidebar.open {
    transform: translateX(0);
    width: var(--sidebar-width);
  }
  
  #sidebar.open .nav-item span,
  #sidebar.open .nav-badge,
  #sidebar.open .sidebar-header h1,
  #sidebar.open .sidebar-header p,
  #sidebar.open .nav-section-title {
    display: block;
  }
  
  #sidebar.open .nav-item {
    justify-content: flex-start;
    padding: 12px var(--spacing-md);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .header {
    padding: 0 var(--spacing-md);
  }
  
  .content-area {
    padding: var(--spacing-md);
  }
  
  .filter-bar {
    padding: var(--spacing-md);
  }
  
  .card-header {
    padding: var(--spacing-md);
  }
  
  .card-body {
    padding: var(--spacing-md);
  }
}

/* ========================================
   26. 工具类
   ======================================== */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-muted { color: #6b7280 !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }

.font-mono { font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }

.text-sm { font-size: 13px !important; }
.text-xs { font-size: 12px !important; }
.text-lg { font-size: 18px !important; }

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: var(--spacing-sm) !important; }
.mb-md { margin-bottom: var(--spacing-md) !important; }
.mb-lg { margin-bottom: var(--spacing-lg) !important; }
.mb-xl { margin-bottom: var(--spacing-xl) !important; }

.space-y-sm > * + * { margin-top: var(--spacing-sm); }
.space-y-md > * + * { margin-top: var(--spacing-md); }
.space-y-lg > * + * { margin-top: var(--spacing-lg); }

.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.items-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-1 { flex: 1 !important; }

.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100% !important; }
.cursor-pointer { cursor: pointer !important; }

/* ========================================
   27. 模态框样式
   ======================================== */
.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: 50;
  padding: var(--spacing-lg);
  animation: fadeIn 0.2s ease;
}

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

.modal-container {
  background: #fff;
  border-radius: var(--border-radius-xl);
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #e5e7eb;
  color: #374151;
}

.modal-body {
  padding: var(--spacing-xl);
}

.modal-footer {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
}

/* ========================================
   28. 表单增强样式
   ======================================== */
textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-input:disabled,
.form-select:disabled {
  background: #f9fafb;
  cursor: not-allowed;
}

.form-helper {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 4px;
}

.form-row {
  display: flex;
  gap: var(--spacing-md);
}

.form-row .form-group {
  flex: 1;
}

/* ========================================
   29. 更多工具类
   ======================================== */
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.border-t { border-top: 1px solid #e5e7eb !important; }
.border-b { border-bottom: 1px solid #e5e7eb !important; }
.border-l-4 { border-left: 4px solid !important; }
.border-l-amber-500 { border-left-color: #f59e0b !important; }

.p-4 { padding: var(--spacing-md) !important; }
.pt-4 { padding-top: var(--spacing-md) !important; }
.mt-4 { margin-top: var(--spacing-md) !important; }
.mt-6 { margin-top: var(--spacing-lg) !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: var(--spacing-md) !important; }
.mb-6 { margin-bottom: var(--spacing-lg) !important; }
.ml-2 { margin-left: 8px !important; }
.mr-1 { margin-right: 4px !important; }
.mr-2 { margin-right: 8px !important; }

.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: var(--spacing-md) !important; }
.gap-6 { gap: var(--spacing-lg) !important; }

.rounded-lg { border-radius: var(--border-radius-lg) !important; }
.rounded-xl { border-radius: var(--border-radius-xl) !important; }

.max-w-xs { max-width: 20rem !important; }

.text-2xl { font-size: 24px !important; }
.text-3xl { font-size: 30px !important; }
.text-6xl { font-size: 60px !important; }

.px-6 { padding-left: var(--spacing-xl) !important; padding-right: var(--spacing-xl) !important; }
.py-3 { padding-top: 12px !important; padding-bottom: 12px !important; }

/* 颜色类 */
.text-emerald-600 { color: #059669 !important; }
.text-red-600 { color: #dc2626 !important; }
.text-blue-600 { color: #2563eb !important; }
.text-amber-600 { color: #d97706 !important; }
.text-indigo-600 { color: #4f46e5 !important; }
.text-gray-400 { color: #9ca3af !important; }
.text-gray-500 { color: #6b7280 !important; }
.text-gray-600 { color: #4b5563 !important; }
.text-gray-800 { color: #1f2937 !important; }

.bg-gray-50 { background-color: #f9fafb !important; }
.bg-blue-50 { background-color: #eff6ff !important; }
.bg-green-50 { background-color: #f0fdf4 !important; }
.bg-emerald-50 { background-color: #ecfdf5 !important; }
.bg-red-50 { background-color: #fef2f2 !important; }
.bg-amber-100 { background-color: #fef3c7 !important; }
.bg-red-100 { background-color: #fee2e2 !important; }
.bg-emerald-100 { background-color: #d1fae5 !important; }

/* Grid responsive */
@media (min-width: 1024px) {
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .lg\:flex-row {
    flex-direction: row !important;
  }
  .lg\:items-center {
    align-items: center !important;
  }
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Hover effects */
.hover\:shadow-lg:hover {
  box-shadow: var(--shadow-lg) !important;
}

/* ========================================
   二维码上传样式
   ======================================== */
.qr-upload-area {
  width: 100%;
  min-height: 160px;
  border: 2px dashed #d1d5db;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f9fafb;
  position: relative;
  overflow: hidden;
}

.qr-upload-area:hover {
  border-color: var(--primary-color);
  background: #f0f4ff;
}

.qr-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
}

.qr-preview-img {
  max-width: 140px;
  max-height: 140px;
  object-fit: contain;
  border-radius: var(--border-radius);
}

#qrPreviewContainer,
#editQrPreviewContainer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.qr-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
}

.qr-remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}
