/* ========================================
   TEMUAI Admin - Premium Light Theme
   高端商务浅色主题
   ======================================== */

:root {
  /* 主色调 - 科技蓝 */
  --primary: #4F46E5;
  --primary-light: #6366F1;
  --primary-dark: #4338CA;
  --primary-bg: #EEF2FF;
  --primary-glow: rgba(79, 70, 229, 0.15);
  
  /* 成功 */
  --success: #059669;
  --success-light: #10B981;
  --success-bg: #ECFDF5;
  
  /* 警告 */
  --warning: #D97706;
  --warning-light: #F59E0B;
  --warning-bg: #FFFBEB;
  
  /* 危险 */
  --danger: #DC2626;
  --danger-light: #EF4444;
  --danger-bg: #FEF2F2;
  
  /* 信息 */
  --info: #0284C7;
  --info-bg: #F0F9FF;
  
  /* 文字层次 */
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  
  /* 浅色背景层次 */
  --bg: #F9FAFB;
  --bg-white: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg2: var(--bg-white);
  --bg-hover: #F3F4F6;
  --bg-stripe: #FAFAFA;
  
  /* 边框 */
  --border-light: #F3F4F6;
  --border: #E5E7EB;
  --border-hover: #D1D5DB;
  
  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.06), 0 10px 10px rgba(0, 0, 0, 0.04);
  
  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* 布局 */
  --sidebar-width: 260px;
  --header-height: 64px;
}

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

html { font-size: 14px; -webkit-font-smoothing: antialiased; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

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

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.sidebar-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.nav-section { margin-bottom: 24px; }

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

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

.nav-item.active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600;
}

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

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  background: var(--bg-hover);
  border-radius: 10px;
  color: var(--text-muted);
}

.nav-badge.success {
  background: var(--success-bg);
  color: var(--success);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-lg);
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.user-info { flex: 1; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 11px; color: var(--text-muted); }

/* ---------- Main ---------- */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg);
}

/* Header */
.header {
  height: var(--header-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-secondary); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span:not(.current-page) { opacity: 0.5; }
.current-page { color: var(--text-primary); }

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

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.search-box span { font-size: 14px; opacity: 0.5; }
.search-box input {
  width: 200px;
  background: none;
  border: none;
  color: var(--text-primary);
  outline: none;
}
.search-box input::placeholder { color: var(--text-muted); }

.header-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all 0.15s;
  position: relative;
}

.header-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.header-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-white);
}

/* Content */
.content { padding: 32px; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-title-icon { font-size: 28px; }

.page-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Stats Grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

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

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-bg); }
.stat-icon.success { background: var(--success-bg); }
.stat-icon.warning { background: var(--warning-bg); }
.stat-icon.danger { background: var(--danger-bg); }

.stat-content { flex: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text-primary); letter-spacing: -1px; }
.stat-trend { font-size: 12px; font-weight: 500; margin-top: 6px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.2s;
}

.card:hover { box-shadow: var(--shadow-md); }

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body { padding: 24px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }

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

.table th, .table td { padding: 14px 20px; text-align: left; }

.table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.table td { font-size: 13px; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-stripe); }

.table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

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

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

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

/* ---------- Forms ---------- */
.form-input {
  padding: 10px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  transition: all 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

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

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ---------- Progress ---------- */
.progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-bar.success { background: linear-gradient(90deg, var(--success) 0%, var(--success-light) 100%); }
.progress-bar.warning { background: linear-gradient(90deg, var(--warning) 0%, var(--warning-light) 100%); }
.progress-bar.danger { background: linear-gradient(90deg, var(--danger) 0%, var(--danger-light) 100%); }

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.active .modal { transform: scale(1); }

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

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

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.modal-body { padding: 24px; overflow-y: auto; max-height: calc(90vh - 140px); }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }

/* ---------- Form Elements ---------- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
.form-label span { color: var(--danger); }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Switch */
.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: var(--border);
  border-radius: 24px;
  transition: all 0.2s;
}

.switch-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.filter-item { display: flex; align-items: center; gap: 10px; }
.filter-label { font-size: 12px; color: var(--text-muted); }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; gap: 4px; }

.pagination-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.pagination-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.pagination-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.pagination-btn.active:hover { background: var(--primary); color: white; }
.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-hover);
}

.pagination-ellipsis {
  padding: 0 8px;
  color: var(--text-muted);
  font-size: 13px;
  user-select: none;
}

/* ---------- Dashboard Specific ---------- */
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 24px; }

/* Hero */
.dashboard-hero {
  position: relative;
  padding: 32px;
  margin: -32px -32px 32px -32px;
  background: linear-gradient(135deg, var(--primary-bg) 0%, white 100%);
  border-bottom: 1px solid var(--border);
}

.hero-content { display: flex; justify-content: space-between; align-items: center; }
.hero-left h1 { font-size: 28px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.hero-left p { font-size: 14px; color: var(--text-muted); }
.hero-stats { display: flex; gap: 48px; }
.hero-stat { text-align: right; }
.hero-stat-value { font-size: 32px; font-weight: 700; color: var(--text-primary); letter-spacing: -1px; }
.hero-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Model Cards */
.model-status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.model-card {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all 0.15s;
}

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

.model-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.model-info { display: flex; align-items: center; gap: 12px; }
.model-avatar { width: 36px; height: 36px; background: var(--primary-bg); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.model-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.model-provider { font-size: 11px; color: var(--text-muted); }

.model-usage { margin-top: 10px; }
.usage-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.usage-bar-fill { height: 100%; border-radius: 3px; position: relative; }
.usage-text { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Ranking */
.rank-list { padding: 0; }

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.rank-item:last-child { border-bottom: none; }

.rank-item:hover { background: var(--bg-stripe); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }

.rank-position {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg);
  color: var(--text-muted);
}

.rank-item:nth-child(1) .rank-position { background: linear-gradient(135deg, #FFD700, #FFA500); color: white; }
.rank-item:nth-child(2) .rank-position { background: linear-gradient(135deg, #C0C0C0, #A8A8A8); color: white; }
.rank-item:nth-child(3) .rank-position { background: linear-gradient(135deg, #CD7F32, #B87333); color: white; }

.rank-details { flex: 1; }
.rank-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.rank-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.rank-bar { width: 100px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.rank-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%); border-radius: 3px; }

/* Timeline */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--primary), var(--primary-light), var(--border)); border-radius: 1px; }

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

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--bg-white);
  border: 2px solid var(--primary);
  border-radius: 50%;
}

.timeline-content {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all 0.15s;
}

.timeline-content:hover {
  border-color: var(--primary);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.timeline-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.timeline-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.timeline-title { font-size: 13px; color: var(--text-secondary); flex: 1; }
.timeline-title strong { color: var(--text-primary); font-weight: 600; }
.timeline-time { font-size: 11px; color: var(--text-muted); }
.timeline-desc { font-size: 12px; color: var(--text-muted); padding-left: 38px; }

/* Quick Actions */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.quick-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.quick-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-bg);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px;
  transition: all 0.2s;
}

.quick-card:hover .quick-icon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.quick-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }

/* Charts */
.chart-container {
  position: relative;
  height: 240px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-white) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.chart-lines { position: absolute; bottom: 40px; left: 40px; right: 40px; height: 140px; }
.chart-lines svg { width: 100%; height: 100%; }
.chart-area { fill: url(#areaGradient); }
.chart-line-path { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round; }
.chart-dots { position: absolute; inset: 0; }
.chart-dot { position: absolute; width: 8px; height: 8px; background: var(--primary); border: 2px solid white; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: var(--shadow-sm); }
.chart-labels { position: absolute; bottom: 12px; left: 40px; right: 40px; display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Section */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.section-title-icon { width: 28px; height: 28px; background: var(--primary-bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* Shop Cards */
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.shop-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.15s;
}

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

.shop-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.shop-icon { width: 48px; height: 48px; background: var(--primary-bg); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.shop-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.shop-owner { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.shop-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.shop-stat { text-align: center; }
.shop-stat-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.shop-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* Credit Display */
.credit-display { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--bg); border-radius: var(--radius-lg); }
.credit-amount { font-size: 32px; font-weight: 700; color: var(--text-primary); }
.credit-unit { font-size: 14px; color: var(--text-muted); }
.credit-bar { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.credit-bar-fill { height: 100%; border-radius: 4px; }

/* History Table */
.history-item { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.history-item:last-child { border-bottom: none; }
.history-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.history-content { flex: 1; }
.history-title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.history-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.history-amount { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.history-time { font-size: 11px; color: var(--text-muted); }

/* ========== Responsive ========== */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .content { padding: 20px; }
}
