/* Xboard 用户前台 - 仪表盘 UI 优化 */

:root {
  --xb-primary: #18a058;
  --xb-primary-light: #36ad6a;
  --xb-bg-start: #f0f4f8;
  --xb-bg-end: #e8eef5;
  --xb-card-bg: rgba(255, 255, 255, 0.92);
  --xb-card-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --xb-card-radius: 16px;
  --xb-content-max: 1200px;
}

html.dark {
  --xb-bg-start: #101014;
  --xb-bg-end: #18181c;
  --xb-card-bg: rgba(36, 36, 40, 0.95);
  --xb-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* 页面背景 */
body,
.n-layout {
  background: linear-gradient(145deg, var(--xb-bg-start) 0%, var(--xb-bg-end) 100%) !important;
  min-height: 100vh;
}

.n-layout-content {
  max-width: var(--xb-content-max);
  margin: 0 auto;
  padding: 20px 24px 32px !important;
}

/* 侧边栏 */
.n-layout-sider {
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.04) !important;
}

html.dark .n-layout-sider {
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.25) !important;
}

.side-menu:not(.n-menu--collapsed) .n-menu-item-content.n-menu-item-content--selected {
  font-weight: 600;
}

/* 公告轮播 */
.n-carousel {
  border-radius: var(--xb-card-radius) !important;
  overflow: hidden;
  box-shadow: var(--xb-card-shadow);
}

.carousel-img[data-v-2492d831] {
  height: 200px !important;
  object-fit: cover;
  filter: saturate(1.05);
}

.n-carousel .n-carousel__slide {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #18a058 100%) !important;
}

.n-carousel .n-carousel__dots {
  bottom: 12px !important;
}

/* 仪表盘卡片网格 */
.card-container[data-v-16d7c058] {
  row-gap: 24px !important;
  column-gap: 24px !important;
  padding: 0 !important;
}

@media screen and (min-width: 768px) {
  .card-container[data-v-16d7c058] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* 订阅卡片占满一行 */
  .card-container[data-v-16d7c058] .card-item[data-v-16d7c058]:first-child {
    grid-column: 1 / -1;
  }
}

@media screen and (min-width: 1200px) {
  .card-container[data-v-16d7c058] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* 卡片通用 */
.card-item[data-v-16d7c058] .n-card {
  border-radius: var(--xb-card-radius) !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  background: var(--xb-card-bg) !important;
  box-shadow: var(--xb-card-shadow) !important;
  backdrop-filter: blur(12px);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card-item[data-v-16d7c058] .n-card:hover {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1) !important;
}

html.dark .card-item[data-v-16d7c058] .n-card {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.card-item[data-v-16d7c058] .n-card-header {
  padding-bottom: 8px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
}

/* 订阅卡片 - 套餐名 */
.card-item[data-v-16d7c058]:first-child .n-card .text-2xl,
.card-item[data-v-16d7c058]:first-child .n-card .text-xl {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--xb-primary) 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 流量进度条 */
.n-progress-graph-line-fill {
  background: linear-gradient(90deg, var(--xb-primary) 0%, var(--xb-primary-light) 100%) !important;
  border-radius: 999px !important;
}

.n-progress-graph-line-rail {
  border-radius: 999px !important;
  height: 10px !important;
}

.n-progress .n-progress-graph {
  margin-top: 4px;
}

/* 捷径列表 */
.card-item[data-v-16d7c058] .n-card .cursor-pointer {
  border-radius: 12px;
  margin: 4px 0;
  padding: 14px 16px !important;
  transition: background 0.2s ease, transform 0.15s ease;
}

.card-item[data-v-16d7c058] .n-card .cursor-pointer:hover {
  background: rgba(24, 160, 88, 0.08) !important;
  transform: translateX(4px);
}

html.dark .card-item[data-v-16d7c058] .n-card .cursor-pointer:hover {
  background: rgba(54, 173, 106, 0.15) !important;
}

/* 捷径图标容器 */
.card-item[data-v-16d7c058] .text-3xl {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(24, 160, 88, 0.12) 0%, rgba(102, 126, 234, 0.12) 100%);
  font-size: 1.35rem !important;
}

/* 顶栏 */
.n-layout-header {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}

html.dark .n-layout-header {
  background: rgba(24, 24, 28, 0.9) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* 移动端 */
@media (max-width: 768px) {
  .n-layout-content {
    padding: 12px 16px 24px !important;
  }

  .carousel-img[data-v-2492d831] {
    height: 160px !important;
  }
}
