/* ============ 基础重置（官网深色主题） ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: #0d0d1a;
  color: #cbd5e1;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 23px !important;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; }

/* ============ 整体布局 ============ */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============ 顶部导航栏（原侧边栏改为横向，官网红→橙渐变） ============ */
.sidebar {
  width: 100%;
  background: linear-gradient(90deg, #FF2C55 0%, #FF6B35 100%);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  height: 60px;
  padding: 0 20px;
  gap: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* 导航栏固定后，主内容区需要留出顶部空间 */
.main-content {
  padding-top: 60px;
}
.sidebar-logo {
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: none;
  flex-shrink: 0;
}
.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: white;
  flex-shrink: 0;
}
.sidebar-logo .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sidebar-logo .logo-text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}
.sidebar-logo .logo-text .brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.sidebar-logo .logo-text .sub-name {
  font-size: 14px;
  opacity: 0.75;
  font-weight: 400;
  line-height: 1.2;
}
.sidebar-nav {
  flex: 1;
  padding: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  gap: 24px;
}
.sidebar-section {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
.sidebar-section-title {
  display: none;
}
.sidebar-menu {
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: center;
}
.sidebar-menu-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.sidebar-menu-item:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
}
.sidebar-menu-item.active {
  background: rgba(0,0,0,0.18);
  color: #fff;
  font-weight: 600;
}
.sidebar-menu-item .icon {
  display: none;
}
/* 管理员专属菜单，默认显示 */
.sidebar-menu-item.admin-only {
  display: flex;
}
.sidebar-badge {
  margin-left: 6px;
  background: #25F4EE;
  color: #0d0d1a;
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* ============ 主内容区 ============ */
.main-content {
  flex: 1;
  margin-left: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ============ 顶部栏（页面内的二级头部） ============ */
.header-bar {
  background: #16162b;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 60px;
  z-index: 9998;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-title {
  font-size: 19px;
  font-weight: 600;
  color: #f1f5f9;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  color: #cbd5e1;
}
.header-user .avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #FF2C55, #FF6B35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}
.header-user {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #16162b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  min-width: 140px;
  z-index: 100;
  display: none;
  overflow: hidden;
}
.user-dropdown.show {
  display: block;
}
.user-dropdown-item {
  padding: 10px 16px;
  font-size: 17px;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}
.user-dropdown-item:hover {
  background: rgba(255,44,85,0.15);
  color: #FF8BA5;
}

/* 修改密码弹窗 */
.password-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.password-modal.show { display: flex; }
.password-modal-content {
  background: #16162b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  width: 90%;
  max-width: 400px;
  padding: 24px;
}
.password-modal-title {
  font-size: 23px !important;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 20px;
}
.password-modal .form-group {
  margin-bottom: 16px;
}
.password-modal label {
  display: block;
  font-size: 17px;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.password-modal input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  font-size: 18px;
  outline: none;
  background: #0d0d1a;
  color: #e2e8f0;
}
.password-modal input:focus {
  border-color: #25F4EE;
}
.password-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.password-modal-footer button {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 17px;
  cursor: pointer;
  border: none;
}
.btn-cancel {
  background: #1e1e38;
  color: #cbd5e1;
}
.btn-cancel:hover { background: #26264a; }
.btn-confirm {
  background: linear-gradient(135deg, #FF2C55 0%, #FF6B35 100%);
  color: #fff;
}
.btn-confirm:hover { opacity: 0.9; }
.header-btn {
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #16162b;
  color: #e2e8f0;
  border-radius: 8px;
  font-size: 17px;
  transition: all 0.2s;
}
.header-btn:hover {
  background: #1e1e38;
  border-color: rgba(255,255,255,0.35);
}

/* ============ 内容容器 ============ */
.page-content {
  padding: 16px 20px;
}

/* ============ 页面头部 ============ */
.page-header {
  margin-bottom: 16px;
}
.page-title {
  font-size: 23px !important;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 4px;
}
.page-subtitle {
  font-size: 17px;
  color: #8b8ba7;
}

/* ============ 时间筛选栏 ============ */
.filter-bar {
  background: #16162b;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid rgba(255,255,255,0.08);
}
.filter-tabs {
  display: flex;
  gap: 4px;
  background: transparent;
}
.filter-tab {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 17px;
  color: #8b8ba7;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  border: 1px solid transparent;
}
.filter-tab:hover {
  color: #e2e8f0;
  background: rgba(255,255,255,0.06);
}
.filter-tab.active {
  background: rgba(37,244,238,0.16);
  color: #79eefb;
  border-color: rgba(37,244,238,0.4);
  font-weight: 600;
}
.filter-date {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.filter-date input {
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  font-size: 17px;
  color: #e2e8f0;
  background: #0d0d1a;
}
.filter-date input:focus {
  outline: none;
  border-color: #25F4EE;
}
.filter-search {
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  font-size: 17px;
  width: 160px;
  background: #0d0d1a;
  color: #e2e8f0;
}
.filter-search:focus {
  outline: none;
  border-color: #25F4EE;
}
.channel-filter {
  display: flex;
  align-items: center;
  gap: 6px;
}
.channel-select {
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  font-size: 17px;
  color: #e2e8f0;
  background: #0d0d1a;
  cursor: pointer;
  min-width: 120px;
}
.channel-select:focus {
  outline: none;
  border-color: #25F4EE;
}

/* ============ 数据概览卡片 ============ */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.metric-card {
  background: linear-gradient(135deg, rgba(255,44,85,0.16), rgba(37,244,238,0.08));
  border: 1px solid rgba(255,44,85,0.28);
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.metric-card .metric-label {
  font-size: 17px;
  color: #ff9ab1;
  font-weight: 500;
  margin-bottom: 6px;
}
.metric-card .metric-value {
  font-size: 27px;
  font-weight: 700;
  color: #ffffff;
  font-family: 'SF Mono', 'Segoe UI', 'PingFang SC', monospace;
  line-height: 1.2;
}
.metric-card .metric-sub {
  font-size: 16px;
  color: #ffb199;
  margin-top: 4px;
}

/* ============ 卡片通用样式 ============ */
.card {
  background: #16162b;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 14px;
  overflow: hidden;
}
.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-title .icon { font-size: 19px; }
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  color: #8b8ba7;
}
.card-body {
  padding: 14px 16px;
}

/* ============ 图表卡片 ============ */
.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.chart-card {
  background: #16162b;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 12px 14px;
}
.chart-card .chart-title {
  font-size: 17px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 8px;
}
.chart-container {
  width: 100%;
  height: 240px;
}

/* ============ 排行榜卡片 ============ */
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.ranking-card {
  background: #16162b;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.ranking-card .ranking-header {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ranking-card .ranking-title {
  font-size: 20px;
  font-weight: 600;
  color: #e2e8f0;
}
.ranking-card .ranking-more {
  font-size: 18px;
  color: #8b8ba7;
  cursor: pointer;
}
.ranking-card .ranking-more:hover { color: #e2e8f0; }
.ranking-list .rank-clickable {
  cursor: pointer;
  transition: color 0.15s;
}
.ranking-list .rank-clickable:hover {
  color: #25F4EE;
}
.ranking-list {
  padding: 4px 0;
}
.ranking-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  transition: background 0.15s;
}
.ranking-item:hover { background: rgba(255,255,255,0.05); }
.ranking-item .rank-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
  background: #1e1e38;
  color: #8b8ba7;
}
.ranking-item.rank-1 .rank-num { background: linear-gradient(135deg, #FF2C55, #FF6B35); color: #fff; }
.ranking-item.rank-2 .rank-num { background: rgba(37,244,238,0.85); color: #0d0d1a; }
.ranking-item.rank-3 .rank-num { background: rgba(255,200,0,0.9); color: #0d0d1a; }
.ranking-item .rank-name {
  flex: 1;
  font-size: 19px;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ranking-item .rank-info {
  text-align: right;
  flex-shrink: 0;
}
.ranking-item .rank-value {
  font-size: 19px;
  font-weight: 600;
  color: #ffffff;
  font-family: 'SF Mono', monospace;
}
.ranking-item .rank-sub {
  font-size: 17px;
  color: #8b8ba7;
}

/* ============ 表格样式 ============ */
.table-wrapper {
  overflow-x: auto;
  background: #16162b;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 20px;
}
.data-table thead th {
  background: #1e1e38;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #8b8ba7;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 19px;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #e2e8f0;
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.05); }
.data-table .num {
  text-align: right;
  font-family: 'SF Mono', 'Segoe UI', monospace;
  color: #ffffff;
}
.data-table .rank-1 { color: #ffe0e8; font-weight: 700; }
.data-table .rank-2 { color: #25F4EE; font-weight: 600; }
.data-table .rank-3 { color: #ffc800; font-weight: 600; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #FF2C55, #FF6B35);
  color: #fff;
  border-color: rgba(255,255,255,0.1);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ff4770, #ff8458);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255,44,85,0.35);
}
.btn-secondary {
  background: #16162b;
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.2);
}
.btn-secondary:hover {
  background: #1e1e38;
  border-color: rgba(255,255,255,0.35);
}
.btn-success {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}
.btn-success:hover { background: #059669; }
.btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.btn-danger:hover { background: #dc2626; }
.btn-warning {
  background: #f59e0b;
  color: #0d0d1a;
  border-color: #f59e0b;
}
.btn-warning:hover { background: #d97706; }
.btn-sm {
  padding: 5px 12px;
  font-size: 17px;
}
.btn-xs {
  padding: 3px 8px;
  font-size: 16px;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ============ 上传区域 ============ */
.upload-zone {
  border: 2px dashed rgba(255,255,255,0.22);
  border-radius: 10px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  background: #16162b;
  transition: all 0.2s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: #25F4EE;
  background: rgba(37,244,238,0.06);
}
.upload-zone .upload-icon {
  font-size: 42px;
  margin-bottom: 10px;
  opacity: 0.5;
}
.upload-zone p {
  color: #cbd5e1;
  font-size: 17px;
}
.upload-zone p.small {
  font-size: 16px;
  color: #8b8ba7;
  margin-top: 4px;
}
.upload-zone input { display: none; }

/* ============ 文件列表 ============ */
.file-list {
  margin-top: 12px;
}
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #1e1e38;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 17px;
  color: #e2e8f0;
}
.file-item .name {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.file-item .name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-item .remove {
  color: #ef4444;
  cursor: pointer;
  font-size: 23px !important;
  line-height: 1;
  opacity: 0.8;
}
.file-item .remove:hover { opacity: 1; }

/* ============ 标签 ============ */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  background: rgba(255,44,85,0.16);
  color: #FF8BA5;
}
.tag-blue { background: rgba(37,244,238,0.16); color: #7ff; }
.tag-green { background: rgba(16,185,129,0.18); color: #6ee7b7; }
.tag-orange { background: rgba(245,158,11,0.2); color: #fcd34d; }
.tag-red { background: rgba(239,68,68,0.2); color: #fca5a5; }
.tag-purple { background: rgba(255,44,85,0.16); color: #FF8BA5; }

/* ============ 加载动画 ============ */
.loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #FF2C55;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.loading-lg {
  width: 28px;
  height: 28px;
  border-width: 3px;
}
.loading-white {
  border-color: rgba(255,255,255,0.3);
  border-top-color: #fff;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Toast提示 ============ */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 18px;
  border-radius: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  z-index: 9999;
  animation: toastSlideIn 0.3s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  min-width: 200px;
  max-width: 360px;
}
.toast.success { background: linear-gradient(135deg, #10b981, #059669); }
.toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast.info { background: linear-gradient(135deg, #25F4EE, #0ea5b7); color: #0d0d1a; }
.toast.warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
@keyframes toastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============ 空状态 ============ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #8b8ba7;
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.4;
}
.empty-state p {
  font-size: 17px;
  margin-bottom: 14px;
}

/* ============ 进度条 ============ */
.progress-box {
  margin-top: 12px;
  padding: 14px;
  background: rgba(37,244,238,0.07);
  border: 1px solid rgba(37,244,238,0.25);
  border-radius: 10px;
}
.progress-box.hidden { display: none; }
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 600;
  color: #25F4EE;
}
.progress-bar-bg {
  height: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF2C55, #FF6B35);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.progress-message {
  margin-top: 6px;
  font-size: 16px;
  color: #25F4EE;
}

/* ============ 隐藏/显示工具类 ============ */
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }

/* ============ 分页 ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 14px;
  font-size: 17px;
  color: #8b8ba7;
}
.page-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: #1e1e38;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover {
  border-color: #25F4EE;
  color: #25F4EE;
}
.page-btn.active {
  background: linear-gradient(135deg, #FF2C55, #FF6B35);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============ 模态框 ============ */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}
.modal.show { display: flex; }
.modal-content {
  background: #16162b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUp 0.3s ease;
}
.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 19px;
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close {
  font-size: 25px;
  color: #8b8ba7;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: #e2e8f0; }
.modal-body {
  padding: 18px;
  overflow-y: auto;
  color: #cbd5e1;
}
.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

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

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .chart-grid { grid-template-columns: 1fr 1fr; }
  .ranking-grid { grid-template-columns: 1fr 1fr; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { height: 52px; padding: 0 12px; gap: 12px; }
  .sidebar-logo .logo-text,
  .sidebar-menu-item span:not(.icon),
  .sidebar-section-title { display: none; }
  .sidebar-nav { gap: 8px; }
  .sidebar-menu { gap: 2px; }
  .sidebar-menu-item { padding: 8px 10px; }
  .header-bar { top: 52px; height: 48px; padding: 0 16px; }
  .chart-grid { grid-template-columns: 1fr; }
  .ranking-grid { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 12px; }
}

/* ===== 统一顶栏(官网深色主题) ===== */
.top-nav-bar {
  background: linear-gradient(135deg, #FF2C55 0%, #FF6B35 100%);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.top-nav-left { display: flex; align-items: center; gap: 24px; }
.top-nav-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 20px; font-weight: 700; }
.top-nav-logo img { height: 32px; width: 32px; border-radius: 6px; }
.top-nav-menu { display: flex; align-items: center; gap: 4px; }
.top-nav-item { padding: 8px 14px; color: rgba(255,255,255,0.9); font-size: 15px; cursor: pointer; border-radius: 8px; transition: all 0.2s; text-decoration: none; white-space: nowrap; }
.top-nav-item:hover { color: #fff; background: rgba(255,255,255,0.16); }
.top-nav-item.active { color: #fff; background: rgba(0,0,0,0.18); font-weight: 600; }
.top-nav-right { display: flex; align-items: center; gap: 16px; color: #fff; }
.top-nav-user { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.top-nav-user .avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.page-title-bar { background: #16162b; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.08); }
.page-title-bar .title { font-size: 20px; font-weight: 700; color: #f1f5f9; }
.page-title-bar .right-tools { font-size: 15px; color: #8b8ba7; }

/* 隐藏旧版顶部导航(sidebar), 主内容取消让位 */
.sidebar { display: none !important; }
.main-content { padding-top: 0 !important; margin-left: 0 !important; }