/**
 * 企鹅云加速器仪表板 — 主题集成样式（与 dashboard-reference 1:1）
 */

:root {
  --qy-pg-bg: #f0f4f8;
  --qy-pg-green: #22c55e;
  --qy-pg-green-bg: #dcfce7;
  --qy-pg-blue-start: #00a2ff;
  --qy-pg-blue-end: #0077ff;
  --qy-pg-max: 1280px;
  --qy-pg-radius: 16px;
  --qy-pg-shadow: 0 2px 12px rgba(15, 40, 80, 0.06);
}

[data-theme="light"] .qy-dashboard-layout.fw-layout,
.qy-dashboard-layout.fw-layout {
  background: var(--qy-pg-bg) !important;
}

[data-theme="light"] .qy-dashboard-layout.fw-layout::before {
  display: none !important;
}

/* ===== 顶部导航 ===== */
.qy-pg-navbar {
  background: #fff !important;
  border-bottom: 1px solid #e8edf2 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  overflow: visible !important;
}

.qy-pg-navbar .qy-navbar-inner {
  display: flex !important;
  grid-template-columns: unset !important;
  align-items: center;
  flex-wrap: nowrap;
  max-width: var(--qy-pg-max) !important;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px !important;
  height: auto !important;
  min-height: 52px;
  gap: 12px;
  box-sizing: border-box;
}

.qy-pg-navbar .qy-brand,
.qy-pg-navbar .fw-menu-toggle {
  display: none !important;
}

.qy-pg-navbar .qy-nav.fw-nav-pills {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.qy-pg-navbar .qy-nav.fw-nav-pills::-webkit-scrollbar { display: none; }

.qy-pg-navbar .qy-nav-item.fw-nav-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: 0 !important;
  flex-direction: row !important;
}

.qy-pg-navbar .qy-nav-item.fw-nav-pill .qy-nav-icon {
  display: flex;
  align-items: center;
  font-size: 0 !important;
}

.qy-pg-navbar .qy-nav-item.fw-nav-pill .qy-nav-icon svg {
  width: 16px;
  height: 16px;
}

.qy-pg-navbar .qy-nav-item.fw-nav-pill:hover {
  color: #1e293b !important;
  background: #f1f5f9 !important;
}

.qy-pg-navbar .qy-nav-item.fw-nav-pill.active {
  background: var(--qy-pg-green) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.qy-pg-navbar .qy-nav-item.fw-nav-pill.active .qy-nav-icon svg {
  stroke: #fff;
}

.qy-pg-navbar .qy-navbar-actions {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: auto;
  gap: 8px;
}

/* 桌面/平板：强制保持顶部横向菜单可见（覆盖 umi.css 1024px 折叠规则） */
@media (min-width: 769px) {
  .qy-pg-navbar .qy-nav.fw-nav-pills {
    display: flex !important;
    position: static !important;
    flex-direction: row !important;
    max-height: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 8px 0 !important;
  }
}

.qy-pg-navbar .ThemeSwitcher,
.qy-pg-navbar .fw-theme-switcher {
  display: none !important;
}

/* ===== 主内容区 ===== */
.qy-dashboard-layout.fw-layout .qy-main {
  max-width: var(--qy-pg-max) !important;
  padding: 20px !important;
  background: transparent !important;
}

.qy-pg-dash .qy-ref-grid,
.qy-pg-dash .pg-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

.qy-pg-dash .qy-ref-main,
.qy-pg-dash .qy-ref-side,
.qy-pg-col-left,
.qy-pg-col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== Hero ===== */
.qy-pg-hero {
  position: relative;
  border-radius: var(--qy-pg-radius);
  background: linear-gradient(135deg, var(--qy-pg-blue-start) 0%, var(--qy-pg-blue-end) 100%) !important;
  box-shadow: 0 8px 28px rgba(0, 119, 255, 0.25) !important;
  border: none !important;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: stretch;
}

.qy-pg-hero::before,
.qy-pg-hero::after { display: none !important; }

.qy-pg-hero .qy-ref-banner-body {
  flex: 1;
  padding: 28px 32px !important;
  max-width: none !important;
  color: #fff;
}

.qy-pg-hero .qy-ref-greet {
  font-size: 13px !important;
  opacity: 0.92;
  margin-bottom: 8px !important;
}

.qy-pg-hero .qy-ref-plan {
  font-size: 26px !important;
  font-weight: 800 !important;
  margin-bottom: 22px !important;
}

.qy-pg-hero .qy-stats-ref {
  display: flex !important;
  gap: 36px !important;
  margin-bottom: 22px !important;
  flex-wrap: wrap;
}

.qy-pg-hero .qy-stats-ref li {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
}

.qy-pg-hero .qy-stats-ref .qy-ref-stat-ico { display: none !important; }

.qy-pg-hero .qy-stats-ref em {
  font-size: 12px !important;
  opacity: 0.88;
}

.qy-pg-hero .qy-stats-ref strong {
  font-size: 17px !important;
  font-weight: 700 !important;
}

.qy-pg-hero .qy-ref-banner-btns { gap: 12px; }

.qy-pg-hero .qy-btn-white {
  padding: 10px 24px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
}

.qy-pg-hero .qy-btn-charge { color: #0d9488 !important; }
.qy-pg-hero .qy-btn-gift { color: #2563eb !important; }
.qy-pg-hero .qy-btn-ico { display: none !important; }

.qy-pg-hero .qy-ref-banner-art {
  width: 240px !important;
  flex-shrink: 0;
  display: flex !important;
  align-items: center;
  padding-right: 16px;
}

/* ===== 白色卡片 ===== */
.qy-pg-card {
  background: #fff !important;
  border-radius: var(--qy-pg-radius) !important;
  box-shadow: var(--qy-pg-shadow) !important;
  border: 1px solid #eef2f6 !important;
  padding: 22px 24px !important;
}

.qy-pg-card::before,
.qy-pg-card::after { display: none !important; }

.qy-pg-card .qy-ref-card-head,
.qy-pg-card .qy-card-head-simple {
  margin-bottom: 18px !important;
  padding: 0 !important;
}

.qy-pg-card .qy-ref-card-icon { display: none !important; }

.qy-pg-card .qy-ref-card-head h2,
.qy-pg-card-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

.qy-pg-card .qy-card-desc { display: none !important; }

/* ===== 客户端下载 ===== */
.qy-pg-dl-desc {
  font-size: 12px;
  color: #94a3b8;
  margin: -8px 0 18px;
  line-height: 1.5;
}

.qy-pg-os-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.qy-pg-os-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  color: #64748b;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.qy-pg-os-btn-ico {
  width: auto;
  height: auto;
  border-radius: 0;
  display: block;
  font-size: 22px;
  line-height: 1;
  background: none;
  border: none;
}

.qy-pg-os-btn-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.qy-pg-os-btn-count {
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  line-height: 1.2;
}

.qy-pg-os-btn.active {
  background: linear-gradient(180deg, #ecfdf5 0%, #dcfce7 100%);
  color: #16a34a;
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.12),
    0 4px 18px rgba(34, 197, 94, 0.16);
}

.qy-pg-os-btn.active .qy-pg-os-btn-count {
  color: #22c55e;
  opacity: 0.9;
}

.qy-pg-dl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.qy-pg-dl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  min-width: 0;
}

.qy-pg-dl-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.qy-pg-dl-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #eef2f6;
}

.qy-pg-dl-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.qy-pg-dl-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qy-pg-dl-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
  word-break: break-word;
}

.qy-pg-dl-ver {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.3;
}

.qy-pg-dl-arch {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.4;
  word-break: break-word;
}

.qy-pg-dl-card-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qy-pg-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.qy-pg-dl-btn:hover { opacity: 0.88; }

.qy-pg-dl-btn-ico {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.qy-pg-dl-btn-ico .qy-ico,
.qy-pg-dl-btn-ico svg {
  width: 12px;
  height: 12px;
}

.qy-pg-dl-btn-download {
  background: #e0f2fe;
  color: #0284c7;
}

.qy-pg-dl-btn-tut {
  background: #f3e8ff;
  color: #9333ea;
}

.qy-pg-dl-more {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .qy-pg-dl-grid { grid-template-columns: 1fr; }
  .qy-pg-os-row { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 系统公告 ===== */
.qy-pg-notice .qy-ref-notice-list li {
  display: block !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin: 0 !important;
}

.qy-pg-notice .qy-ref-notice-dot,
.qy-pg-notice .qy-ref-notice-link { display: none !important; }

.qy-pg-notice .qy-ref-notice-body strong {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  cursor: pointer;
}

.qy-pg-notice .qy-ref-notice-body strong:hover { color: #0077ff; }

.qy-pg-notice .qy-ref-notice-body span { display: none; }

.qy-pg-notice .qy-ref-empty {
  background: transparent !important;
  border: none !important;
  padding: 12px 0 !important;
  font-size: 13px;
}

.qy-pg-notice .qy-ref-refresh {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

/* ===== 订阅链接 ===== */
.qy-pg-subscribe .qy-sub-grid-ref {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px !important;
}

.qy-pg-subscribe .qy-ref-sub-btn {
  flex-direction: column !important;
  align-items: center !important;
  padding: 10px 4px !important;
  min-height: auto !important;
  background: #fafbfc !important;
  border: 1px solid #eef2f6 !important;
  border-radius: 10px !important;
  gap: 6px !important;
}

.qy-pg-subscribe .qy-ref-sub-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  border: none !important;
}

.qy-pg-subscribe .qy-sub-name {
  font-size: 10px !important;
  white-space: normal !important;
  line-height: 1.3 !important;
}

.qy-pg-subscribe .qy-ref-sub-footer {
  border-top: none !important;
  margin-top: 16px !important;
  padding-top: 0 !important;
}

.qy-pg-subscribe .qy-ref-reset-tip { display: none !important; }

.qy-pg-subscribe .qy-ref-reset-btns {
  flex-direction: column;
  gap: 0;
}

.qy-pg-subscribe .qy-ref-reset-copy {
  width: 100%;
  padding: 11px !important;
  border-radius: 10px !important;
  background: #f1f5f9 !important;
  border: none !important;
  color: #1e293b !important;
  font-weight: 600 !important;
}

.qy-pg-subscribe .qy-ref-reset-go {
  display: none !important;
}

/* ===== 邀请卡片 ===== */
.qy-pg-invite {
  border-radius: var(--qy-pg-radius) !important;
  background: linear-gradient(120deg, #ff8c42 0%, #ffb347 100%) !important;
  box-shadow: 0 8px 24px rgba(255, 140, 66, 0.28) !important;
  border: none !important;
  padding: 24px 26px !important;
  min-height: 140px !important;
  height: auto !important;
  display: flex !important;
  align-items: center;
  cursor: pointer;
}

.qy-pg-invite::before,
.qy-pg-invite::after { display: none !important; }

.qy-pg-invite .qy-ref-invite-glow { display: none; }

.qy-pg-invite .qy-ref-invite-body h3 {
  font-size: 17px !important;
  font-weight: 800 !important;
  margin-bottom: 8px !important;
}

.qy-pg-invite .qy-ref-invite-rate {
  display: inline-block !important;
  padding: 4px 14px !important;
  background: rgba(255, 255, 255, 0.3) !important;
  font-size: 13px !important;
  margin-bottom: 14px !important;
}

.qy-pg-invite .qy-ref-invite-body p { display: none !important; }

.qy-pg-invite .qy-ref-invite-btn {
  padding: 10px 22px !important;
  background: rgba(0, 0, 0, 0.22) !important;
  border-radius: 999px !important;
}

.qy-pg-invite .qy-ref-invite-art {
  width: 56px !important;
  height: 56px !important;
  font-size: 40px !important;
  background: transparent !important;
  border: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1100px) {
  .qy-pg-dash .qy-ref-grid { grid-template-columns: 1fr !important; }
  .qy-pg-hero .qy-ref-banner-art { display: none !important; }
}
