/* =========================================================
   顶部公共导航栏 (适用于内页，如列表页、详情页)
   ========================================================= */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* 手机端全屏贴边 */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 56px; /* 强制固定高度，确保所有页面高度一致 */
  padding: 0 14px;
  background-color: var(--bg-card, #FFFFFF);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}

/* PC端：与 640px 容器同宽 */
@media (min-width: 600px) {
  .header-bar {
    width: 100%;
    margin-left: 0;
    padding: 0 18px;
    box-shadow: none;
    border-bottom: 1px solid var(--border-light, #F0EAE4);
  }
}

/* 左侧返回按钮：固定宽度，保证不挤压 */
.header-back {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 40px;
  height: 100%;
}

/* 中间标题：绝对居中，不受两侧按钮数量影响 */
.header-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main, #1F1F1F);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%; /* 防止标题太长遮挡两侧按钮 */
}

/* 右侧操作区：靠右对齐 */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 16px;
  margin-left: auto; /* 保证靠右 */
}

/* 右侧的图标/文字按钮 */
.header-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--text-main, #1F1F1F);
  cursor: pointer;
  background: none;
  border: none;
  height: 100%;
}

.header-action-btn i {
  font-size: 20px;
}

/* 单纯只有图标时的通用类 */
.header-icon {
  font-size: 20px;
  color: var(--text-main, #1F1F1F);
  cursor: pointer;
}