/* ============================================
   天机局管理后台 — 全局样式
   ============================================ */

:root {
  --primary: #8B1A1A;
  --primary-dark: #5C0000;
  --primary-light: #B22222;
  --accent: #DAA520;
  --bg: #F4F6F9;
  --bg-card: #FFFFFF;
  --text: #2C2C2C;
  --text-light: #666;
  --text-muted: #999;
  --border: #E0E0E0;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.15);
  --success: #27AE60;
  --danger: #E74C3C;
  --warning: #F39C12;
  --info: #2980B9;
  --sidebar-width: 220px;
  --header-height: 60px;
  --radius: 8px;
  --radius-sm: 4px;
  --transition: all 0.25s ease;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

/* ============================================
   重置 & 基础
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================
   布局 — 顶部导航栏
   ============================================ */
.admin-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  line-height: 1;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.15); }

.header-logo {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-logo span { font-size: 1.4rem; }

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-admin-info {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
}

.btn-logout {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 5px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  transition: var(--transition);
}
.btn-logout:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.5);
}

/* ============================================
   布局 — 侧边栏
   ============================================ */
.admin-layout {
  display: flex;
  padding-top: var(--header-height);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: #1E1E2E;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 900;
  padding-top: 1rem;
}

.sidebar.collapsed { transform: translateX(-100%); }

.sidebar-nav { list-style: none; }

.sidebar-nav li { margin: 2px 8px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.65);
  font-size: 0.93rem;
  transition: var(--transition);
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.sidebar-nav a.active {
  background: var(--primary);
  color: #fff;
}

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

.sidebar-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.3);
  padding: 16px 22px 6px;
}

/* ============================================
   布局 — 主内容区
   ============================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 1.8rem;
  transition: margin-left 0.3s ease;
  max-width: calc(100% - var(--sidebar-width));
}

.main-content.expanded {
  margin-left: 0;
  max-width: 100%;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.4em;
  background: var(--primary);
  border-radius: 2px;
}

/* ============================================
   统计卡片
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: 0 2px 12px var(--shadow);
  border-left: 4px solid var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

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

.stat-card:nth-child(1) { border-color: var(--primary); }
.stat-card:nth-child(2) { border-color: var(--success); }
.stat-card:nth-child(3) { border-color: var(--info); }
.stat-card:nth-child(4) { border-color: var(--warning); }

.stat-info { flex: 1; }

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-icon {
  font-size: 2.2rem;
  opacity: 0.2;
  margin-left: 1rem;
}

/* ============================================
   图表卡片
   ============================================ */
.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 12px var(--shadow);
  margin-bottom: 1.8rem;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.chart-container { position: relative; height: 300px; }

/* ============================================
   工具栏 & 搜索
   ============================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  gap: 8px;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
  box-shadow: 0 1px 4px var(--shadow);
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.1);
}

.search-box .search-icon { color: var(--text-muted); font-size: 0.95rem; }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 0;
  font-size: 0.92rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
}

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

/* ============================================
   按钮
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

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

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { background: #219150; }

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

.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-warning:hover { background: #D68910; }

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

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

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

/* ============================================
   表格
   ============================================ */
.table-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--shadow);
  overflow: hidden;
}

.table-wrapper { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead tr {
  background: #F8F9FA;
  border-bottom: 2px solid var(--border);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.85rem;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

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

.data-table tbody tr:nth-child(even) { background: #FAFBFC; }

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

.data-table td {
  padding: 12px 16px;
  color: var(--text);
  vertical-align: middle;
}

/* 用户头像 */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  font-weight: 500;
  color: var(--text);
  font-size: 0.92rem;
}

/* 状态徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-success {
  background: #E8F8F0;
  color: var(--success);
}

.badge-danger {
  background: #FDECEA;
  color: var(--danger);
}

.badge-warning {
  background: #FEF9E7;
  color: var(--warning);
}

/* 操作按钮组 */
.action-group {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

/* ============================================
   分页
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text);
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

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

/* ============================================
   模态框
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: translateY(-20px);
  transition: transform 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.show .modal { transform: translateY(0); }

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

.modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  line-height: 1;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body { padding: 1.5rem; }

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

/* 用户详情信息组 */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.detail-item { display: flex; flex-direction: column; gap: 3px; }

.detail-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
}

.detail-separator {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* 用户头像大图 */
.user-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 1rem;
  overflow: hidden;
}

.user-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

/* 确认对话框 */
.confirm-modal .modal { max-width: 400px; }

.confirm-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
}

.confirm-message {
  text-align: center;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   登录页
   ============================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #8B2020 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  position: relative;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo .logo-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 8px rgba(139,26,26,0.3));
}

.login-logo h1 {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
}

.login-logo p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-form .form-group { margin-bottom: 1.2rem; }

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text);
  transition: var(--transition);
  background: var(--bg);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,26,26,0.1);
  background: #fff;
}

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

.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
  font-family: var(--font);
}

.login-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 4px 16px rgba(139,26,26,0.4);
}

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

.login-error {
  background: #FDECEA;
  border: 1px solid #F5C6CB;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: none;
}

.login-error.show { display: block; }

/* ============================================
   Toast 消息
   ============================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: all;
  animation: slideIn 0.3s ease;
  min-width: 200px;
  max-width: 320px;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }

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

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

.toast.leaving { animation: slideOut 0.3s ease forwards; }

/* ============================================
   Loading 状态
   ============================================ */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
  flex-direction: column;
  gap: 12px;
}

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

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

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state-text { font-size: 0.95rem; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }

  .main-content {
    margin-left: 0;
    max-width: 100%;
    padding: 1.2rem;
  }

  .sidebar-overlay {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 850;
  }

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

  .detail-grid { grid-template-columns: 1fr; }
}

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

  .toolbar { flex-direction: column; align-items: stretch; }
  .search-box { max-width: 100%; }

  .data-table th, .data-table td {
    padding: 10px 10px;
    font-size: 0.83rem;
  }

  .action-group { gap: 4px; }
  .btn-sm { padding: 3px 8px; font-size: 0.78rem; }

  .header-admin-info { display: none; }
  .modal { margin: 0.5rem; }
}

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

/* ============================================
   统计卡片 — 6卡片 3x2 网格
   ============================================ */
.stats-grid-6 {
  grid-template-columns: repeat(3, 1fr);
}

.stat-card:nth-child(5) { border-color: #E67E22; }
.stat-card:nth-child(6) { border-color: var(--danger); }

/* ============================================
   趋势切换按钮组
   ============================================ */
.chart-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.trend-toggle-group {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.trend-btn {
  padding: 4px 14px;
  border: none;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
  white-space: nowrap;
}

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

.trend-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(139,26,26,0.3);
}

/* ============================================
   数据分析页 — 摘要栏
   ============================================ */
.analytics-summary {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(139,26,26,0.2);
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.summary-label {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
}

.summary-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.summary-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.25);
}

.summary-update {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-left: auto;
}

/* ============================================
   数据分析页 — 图表网格
   ============================================ */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

/* 小尺寸图表容器（饼图） */
.chart-sm { height: 260px; }

/* 城市排行图 — 较高 */
.chart-city { height: 360px; }

/* 空状态 */
.chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 8px;
}

.chart-empty-icon { font-size: 2rem; opacity: 0.4; }
.chart-empty-text { font-size: 0.9rem; }

/* ============================================
   响应式 — 数据分析页
   ============================================ */
@media (max-width: 1100px) {
  .stats-grid-6 { grid-template-columns: repeat(3, 1fr); }
}

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

@media (max-width: 600px) {
  .stats-grid-6 { grid-template-columns: 1fr 1fr; }
  .analytics-summary { flex-wrap: wrap; }
  .summary-update { margin-left: 0; }
  .chart-header { flex-wrap: wrap; gap: 8px; }
  .chart-header-right { flex-wrap: wrap; gap: 8px; }
}

/* ============================================
   辅助类
   ============================================ */
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-muted); }
.sidebar-overlay { display: none; }
