/* ===== LGSports 共享页面头部样式 ===== */
/* 适用于所有 Tab 页面（matches/tasks/community/profile/tools） */
/* 提取自 dashboard.css，避免在非首页加载完整的 1130 行 CSS */

/* ========================================
   1. 页面头部容器
   ======================================== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 16px 16px;
  background: var(--dashboard-bg, #f5f7fa);
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.page-header-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin: 0;
}

.page-header-subtitle {
  font-size: 13px;
  color: var(--text-secondary, #888);
  line-height: 1.4;
  margin-top: 2px;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ========================================
   2. 菜单按钮（hamburger）
   ======================================== */

.dh-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  flex-shrink: 0;
}

.dh-menu-btn:active {
  background: #f0f0f0;
}

.dh-menu-btn svg {
  width: 20px;
  height: 20px;
  color: #555;
}

/* ========================================
   3. 通知按钮 + 徽章
   ======================================== */

.dh-notify-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.dh-notify-btn:active {
  background: #f0f0f0;
}

.dh-notify-btn svg {
  width: 20px;
  height: 20px;
  color: #555;
}

.dh-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid var(--dashboard-bg, #f5f7fa);
}

/* ========================================
   4. Dark-mode 适配
   ======================================== */

body.dark-mode .page-header {
  background: #111827;
}

body.dark-mode .page-header-title {
  color: #f3f4f6;
}

body.dark-mode .page-header-subtitle {
  color: #6b7280;
}

body.dark-mode .dh-notify-btn {
  background: #1f2937;
  border-color: #374151;
}

body.dark-mode .dh-notify-btn svg {
  color: #9ca3af;
}

body.dark-mode .dh-menu-btn {
  background: #1f2937;
  border-color: #374151;
}

body.dark-mode .dh-menu-btn svg {
  color: #9ca3af;
}

body.dark-mode .dh-badge {
  border-color: #111827;
}

/* ========================================
   5. 移动端响应式
   ======================================== */

@media (max-width: 768px) {
  .page-header {
    padding: 12px 12px 8px;
  }

  .page-header-right {
    gap: 8px;
  }

  .dh-menu-btn {
    width: 36px;
    height: 36px;
  }

  .dh-menu-btn svg {
    width: 18px;
    height: 18px;
  }

  .dh-notify-btn {
    width: 36px;
    height: 36px;
  }

  .dh-notify-btn svg {
    width: 18px;
    height: 18px;
  }
}
