/* ==========================================
   profile.css — 档案页 & 管理页 & 情绪页 UI v3.0
   ========================================== */

/* --- 滚动区域 --- */
.profile-scroll {
  padding: 8px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==========================================
   通用段落标题
   ========================================== */

.archive-section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
}

.archive-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.archive-section-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================
   1. 人物身份卡 v3.0
   ========================================== */

.archive-id-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #5b4a8a 0%, #7562a6 30%, #9b85b8 65%, #c69fc0 100%);
  padding: 16px 18px 6px;
  color: #fff;
}

/* 右上角装饰圆 */
.archive-id-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -80px;
  top: -70px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
}

/* --- 速读卡入口 --- */
.archive-quickcard-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px 6px 10px;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.archive-quickcard-btn:hover {
  background: rgba(255,255,255,.30);
  border-color: rgba(255,255,255,.40);
}

.archive-quickcard-btn:active {
  transform: scale(.95);
}

.archive-quickcard-btn .qc-btn-icon {
  font-size: 14px;
  line-height: 1;
}

.archive-quickcard-btn .qc-btn-text {
  line-height: 1;
}

/* --- 头像 --- */
.archive-avatar {
  margin-bottom: 14px;
}

.archive-avatar-inner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

/* --- 信息区 --- */
.archive-id-body {
  position: relative;
  z-index: 1;
}

.archive-id-name {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}

.archive-id-stage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.stage-badge {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(255,255,255,.18);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  opacity: .95;
}

.archive-id-intro {
  font-size: 14px;
  line-height: 1.6;
  opacity: .92;
  max-width: 260px;
}

/* ==========================================
   2. 关于我 v3.0
   ========================================== */

.archive-about-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archive-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.archive-about-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(82,63,113,.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-about-card.about-card-wide {
  grid-column: 1 / -1;
}

/* 卡片标题行 */
.about-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.about-card-emoji {
  font-size: 15px;
  line-height: 1;
}

.about-card-label {
  font-size: 13px;
  font-weight: 700;
  color: #3D3327;
}

/* 卡片条目 */
.about-card-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

/* 首屏只展示前 2 条，其余默认隐藏（仅 dislikes 区域） */
.about-card-dislikes .about-item:not(.show-preview) {
  display: none;
}

.about-item.show-preview {
  display: flex;
}

.about-item-emoji {
  flex-shrink: 0;
  font-size: 14px;
  width: 18px;
}

.about-item-check {
  flex-shrink: 0;
  color: #7762a8;
  font-weight: 700;
}

.about-item-text {
  flex: 1;
}

.about-item-text strong {
  display: block;
  color: #3D3327;
  font-size: 13px;
}

.about-item-text small {
  display: block;
  font-size: 11.5px;
  color: #999;
  margin-top: 1px;
}

/* 展开按钮 */
.about-expand-btn {
  align-self: center;
  padding: 4px 16px;
  border: none;
  background: #f0ecf7;
  color: #7762a8;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease;
}

.about-expand-btn:hover {
  background: #e6dff2;
}

/* 愿望语录 */
.about-aspiration {
  margin-top: 4px;
  padding: 10px 12px;
  background: #fff8e8;
  border-radius: 10px;
  font-size: 12.5px;
  color: #8B6914;
  line-height: 1.6;
  border-left: 3px solid #F5C542;
}

/* ==========================================
   3. 四类支持模块卡片 v3.0
   ========================================== */

.archive-modules-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archive-module-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive-module-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 2px 12px rgba(82,63,113,.05);
  cursor: pointer;
  transition: all .2s ease;
}

.archive-module-card:active {
  transform: scale(.98);
  background: #faf8fd;
}

/* 模块头部行 */
.module-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.module-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.module-card-head-text {
  flex: 1;
  min-width: 0;
}

.module-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #3D3327;
}

.module-card-count {
  font-size: 11px;
  color: var(--text-muted);
}

.module-card-arrow {
  font-size: 20px;
  color: #ccc;
  flex-shrink: 0;
}

/* 模块摘要 */
.module-card-summary {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 46px;
}

/* 最近一条记录 */
.module-card-recent {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f8f5fc;
  border-radius: 8px;
  margin-left: 46px;
  font-size: 11.5px;
}

.recent-rec-label {
  font-weight: 600;
  color: #7762a8;
  flex-shrink: 0;
}

.recent-rec-text {
  flex: 1;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-rec-date {
  color: #bbb;
  flex-shrink: 0;
}

/* 高亮标签 */
.module-card-highlight {
  margin-top: 6px;
  margin-left: 46px;
  padding: 4px 10px;
  background: #fff3e6;
  color: #D4654A;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

/* ==========================================
   4. 最近变化 v3.0
   ========================================== */

.archive-recent-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive-recent-item {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(82,63,113,.05);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all .2s ease;
}

.archive-recent-item:active {
  transform: scale(.98);
  background: #faf8fd;
}

.recent-item-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.recent-item-body {
  flex: 1;
  min-width: 0;
}

.recent-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.recent-item-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.recent-item-tag.communication { background: #eee9f7; color: #6B5A8E; }
.recent-item-tag.emotion        { background: #faece9; color: #C46B5A; }
.recent-item-tag.care            { background: #edf5eb; color: #5A8C4A; }
.recent-item-tag.work            { background: #faf1df; color: #B08A3A; }

.recent-item-date {
  font-size: 12px;
  color: var(--text-muted);
}

.recent-item-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-item-author {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.archive-recent-empty {
  background: #fff;
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  box-shadow: 0 2px 10px rgba(82,63,113,.05);
}

/* ==========================================
   5. 档案完整度 v3.0
   ========================================== */

.archive-completeness {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(82,63,113,.05);
}

.completeness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.completeness-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.completeness-pct {
  font-size: 13px;
  font-weight: 700;
  color: #7762a8;
}

.completeness-track {
  height: 6px;
  background: #f0ecf7;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.completeness-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #9b85b8, #7762a8);
  transition: width .6s ease;
}

.completeness-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.completeness-chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.completeness-chip.chip-filled { background: #edf5eb; color: #5A8C4A; }
.completeness-chip.chip-missing { background: #f5f0f0; color: var(--text-muted); }

/* ==========================================
   6. 信息来源图例 v3.0
   ========================================== */

.archive-source-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #fafafa;
  border-radius: 10px;
  font-size: 11px;
}

.legend-label {
  color: var(--text-muted);
  margin-right: 4px;
}

.source-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 500;
}

.source-badge.self      { background: #e6f0ff; color: #4A90D9; }
.source-badge.observer  { background: #f0e6ff; color: #722ED1; }
.source-badge.confirmed { background: #e6ffe6; color: #52C41A; }

/* ==========================================
   管理页 — 身份卡片（保留旧样式）
   ========================================== */

.profile-id-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #7562a6, #9b85b8 56%, #c69fc0);
  padding: 22px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.profile-id-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -75px;
  top: -60px;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
}

.profile-id-card .id-avatar-wrap {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  z-index: 1;
}

.profile-id-card .id-info {
  flex: 1;
  min-width: 0;
  z-index: 1;
}

.profile-id-card .id-name {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
}

.profile-id-card .id-meta {
  margin-top: 4px;
  font-size: 13px;
  opacity: .88;
}

.profile-id-card .id-intro {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  opacity: .98;
}

/* 管理页 — 支持模块卡片（旧样式保留） */
.support-archive-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.support-archive-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.support-archive-header .support-archive-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.support-module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.support-module-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px 14px;
  min-height: 138px;
  box-shadow: 0 2px 10px rgba(82,63,113,.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all .2s ease;
}

.support-module-card:active {
  transform: scale(.98);
}

.support-module-card .module-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.support-module-card .module-name {
  font-size: 14px;
  font-weight: 700;
  color: #3D3327;
}

.support-module-card .module-desc {
  font-size: 12.5px;
  color: #999;
  line-height: 1.55;
}

/* ==========================================
   情绪支持页 — 压力信号卡片（保留）
   ========================================== */

.stress-card {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(82,63,113,.05);
  overflow: hidden;
}

.stress-category {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
}

.stress-category.signal   { background: #e6f0ff; color: #4A90D9; }
.stress-category.attention { background: #fff8e6; color: #B08A3A; }
.stress-category.safety    { background: #ffe6e6; color: #D4654A; }

.stress-body {
  padding: 12px 14px;
}

.stress-chain {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.stress-chain-item {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
}

.chain-label {
  font-weight: 600;
  color: #7762a8;
  flex-shrink: 0;
  min-width: 60px;
}

.chain-text {
  color: #555;
}

.stress-do-dont {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.stress-do, .stress-dont {
  padding: 10px;
  border-radius: 8px;
}

.stress-do {
  background: #edf5eb;
}

.stress-dont {
  background: #fdf0f0;
}

.do-dont-label {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stress-do .do-dont-label { color: #5A8C4A; }
.stress-dont .do-dont-label { color: #D4654A; }

.stress-do ul, .stress-dont ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stress-do li, .stress-dont li {
  font-size: 11.5px;
  color: #555;
  line-height: 1.6;
  padding: 2px 0 2px 12px;
  position: relative;
}

.stress-do li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #5A8C4A;
}

.stress-dont li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #D4654A;
}

/* 已验证策略卡片 */
.verified-strategy-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(82,63,113,.05);
}

.vs-name {
  font-size: 14px;
  font-weight: 700;
  color: #3D3327;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vs-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.vs-step {
  padding: 4px 10px;
  background: #e6f0ff;
  color: #4A90D9;
  border-radius: 6px;
  font-size: 11.5px;
}

.vs-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

/* 认识我 — 生活页（保留） */
.know-me-first-person {
  background: linear-gradient(135deg, #7562a6, #9b85b8);
  color: #fff;
  border-radius: 16px;
  padding: 18px 16px;
  font-size: 15px;
  line-height: 1.7;
}

.know-me-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.know-me-mini {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(82,63,113,.05);
}

.know-me-mini.full {
  grid-column: 1 / -1;
}

.know-me-mini-title {
  font-size: 13px;
  font-weight: 700;
  color: #7762a8;
  margin-bottom: 10px;
}

.know-me-independence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.know-me-ind-col {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(82,63,113,.05);
}

.ind-label {
  font-size: 14px;
  font-weight: 700;
  color: #3D3327;
  margin-bottom: 8px;
}

.ind-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ind-list li {
  font-size: 12.5px;
  color: #666;
  padding: 3px 0 3px 14px;
  position: relative;
  line-height: 1.5;
}

.ind-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7762a8;
}

.know-me-aspiration {
  background: linear-gradient(135deg, #fff8e8, #fffdf5);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 13px;
  color: #8B6914;
  line-height: 1.7;
  border: 1px solid #ffe8a1;
}

.asp-label {
  display: block;
  font-weight: 700;
  color: #B08A3A;
  margin-bottom: 4px;
}
