/* ============ 手机端「个人档案」功能区 ============ */
#profileView { flex-direction: column; background: #f0f4fa; }
#profileView .header {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: #ededed; padding: 12px 12px;
  border-bottom: 1px solid #d5d5d5; font-weight: bold; font-size: 16px;
  color: #333; flex-shrink: 0;
}
#profileView .header > span { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; }
#profileView .back-btn { position: relative; z-index: 1; margin-left: -6px; flex-shrink: 0; }
#profileView .drawer-open-btn { z-index: 2; }

.profile-body {
  flex: 1; overflow-y: auto; padding: 16px 16px 24px; background: #f0f4fa;
}

/* 身份切换区（当前居中心 + 其他身份环绕） */
.identity-switch {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 18px 0 14px;
}
.id-mini {
  border: none; background: none; cursor: pointer; padding: 0; font-family: inherit;
}
.id-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 2px 8px rgba(0,0,0,0.14);
}
.id-avatar img { width: 100%; height: 100%; object-fit: cover; }
.id-center .id-avatar {
  width: 80px; height: 80px; font-size: 40px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}
.id-mini.active .id-avatar { border: 2px solid #07c160; }

/* 信息展示（人物档案分组式，弱化表单感） */
.pi-name { text-align: center; font-size: 21px; font-weight: 700; color: #333; }
.pi-tag { text-align: center; font-size: 13px; color: #999; margin: 4px 0 16px; }
.pi-group {
  background: #fff; border-radius: 14px; padding: 14px 16px;
  margin-bottom: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.pi-group-title { font-size: 13px; color: #999; font-weight: 600; margin-bottom: 10px; }
.pi-line {
  display: flex; font-size: 14px; color: #444;
  padding: 5px 0; line-height: 1.5;
}
.pi-key { color: #999; font-size: 13px; width: 68px; flex-shrink: 0; }
.pi-text { font-size: 14px; color: #444; line-height: 1.6; padding: 3px 0; }
.pi-text-dim { color: #888; font-size: 13px; margin-top: 4px; }
.profile-empty { text-align: center; color: #999; font-size: 13px; padding: 60px 20px; }

/* 设置页：头像预览 */
.profile-avatar-preview {
  width: 72px; height: 72px; border-radius: 50%; background: #eef4ff;
  margin: 0 auto 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
/* 设置页：顶部标题栏横排 + 内容区纵向全宽（避免竖排大标题占左侧大块） */
#profileSettingsView { flex-direction: column; }
/* 设置页：两列字段 */
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; min-width: 0; }

/* ================= 我的收藏 ================= */
#favoritesView { flex-direction: column; }

/* 个人档案页的收藏入口 */
.pf-fav-entry {
  margin: 14px 0 4px; padding: 13px 14px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.pf-fav-icon { font-size: 18px; }
.pf-fav-text { flex: 1; font-size: 15px; font-weight: 600; color: #333; }
.pf-fav-count {
  font-size: 12px; color: #999; background: #f0f2f7;
  padding: 2px 9px; border-radius: 20px; min-width: 20px; text-align: center;
}
.pf-fav-arrow { color: #c6c6cc; font-size: 20px; line-height: 1; }

/* 收藏视图：标签页 */
.fav-tabs {
  display: flex; gap: 8px; padding: 2px 0 12px;
}
.fav-tab {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 20px;
  border: 1px solid #e3e6ee; background: #fff; color: #666;
  font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.fav-tab.active {
  background: #07c160; border-color: #07c160; color: #fff; font-weight: 600;
}

/* 收藏列表 */
.fav-list { display: flex; flex-direction: column; gap: 10px; }
.fav-item {
  background: #fff; border-radius: 14px; padding: 13px 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.fav-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.fav-chip {
  font-size: 12px; font-weight: 600; color: #07c160;
  background: rgba(7,193,96,0.1); padding: 2px 9px; border-radius: 20px;
}
.fav-date { font-size: 11px; color: #aaa; }
.fav-content { font-size: 14px; line-height: 1.6; color: #3d3d3d; word-break: break-word; }
.fav-content.is-user { color: #555; }
.fav-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fav-imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.fav-remove {
  margin-top: 10px; font-size: 12px; color: #999;
  background: #f5f6f9; border: none; border-radius: 8px;
  padding: 5px 12px; cursor: pointer; align-self: flex-start;
}
.fav-remove:hover { color: #e5484d; background: #fdecec; }
.fav-empty {
  text-align: center; color: #999; font-size: 13px; padding: 60px 20px;
}

/* ============ 手机端档案：编辑/新增两按钮 + 右上保存 + 底部删除 ============ */
/* 展示页顶部右侧按钮组（编辑当前 / 新增档案） */
#profileView .header .header-actions {
  margin-left: auto; display: flex; gap: 6px; position: relative; z-index: 2;
}
#profileView .header .header-btn,
#profileSettingsView .header .header-btn {
  border: none; cursor: pointer; font-family: inherit;
  background: #fff; color: #333; border-radius: 10px;
  padding: 6px 10px; font-size: 14px; line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
#profileView .header .header-btn:active,
#profileSettingsView .header .header-btn:active { transform: scale(0.94); }

/* 编辑页右上角「保存」（靠右，不与返回键贴左） */
#profileSettingsView .header .save-btn {
  margin-left: auto; position: relative; z-index: 2;
  background: #07c160; color: #fff; font-size: 13px; font-weight: 600;
  padding: 6px 14px;
}

/* 编辑页底部「删除档案」 */
.delete-archive-btn {
  margin-top: 6px;
  background: #fff; color: #e5484d;
  border: 1px solid #f0c4c4; border-radius: 12px;
  padding: 12px; font-size: 14px; font-weight: 600;
}
.delete-archive-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.delete-archive-btn:not(:disabled):active { background: #fdecec; }

/* 确认弹窗描述 */
.modal-desc {
  font-size: 13px; color: #666; line-height: 1.7;
  margin: 6px 0 4px; padding: 0 2px;
}
.modal-desc strong { color: #e5484d; }
.modal-btns .btn-danger {
  background: #e5484d; color: #fff; border: none; border-radius: 10px;
  padding: 10px; font-size: 14px; cursor: pointer; font-family: inherit;
}
