/* =====================================================
 * 个人中心弹窗 — 统一尺寸定义
 * 所有 pc-* 组件均引用本组 CSS 变量，确保模块切换时
 * 弹窗大小固定不变（信息管理 / 通知中心 / 绩效 / 审核 /
 * 所属中心 / 上级领导 全部共用同一套尺寸）。
 * ===================================================== */

:root {
  --pc-modal-width: 940px;
  --pc-modal-max-width: 96vw;
  --pc-modal-height: 640px;
  --pc-modal-max-height: 90vh;
  --pc-modal-radius: 12px;
  --pc-modal-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
  --pc-nav-width: 210px;
  --pc-content-padding: 18px 20px;
  --pc-section-padding: 16px 18px;
  --pc-section-radius: 12px;
  --pc-section-gap: 16px;
}

/* ============ 外层弹窗（个人中心主框） ============ */
.pc-modal {
  width: var(--pc-modal-width);
  max-width: var(--pc-modal-max-width);
  height: var(--pc-modal-height);
  max-height: var(--pc-modal-max-height);
  border-radius: var(--pc-modal-radius);
  box-shadow: var(--pc-modal-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pc-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}
.pc-header h3 { margin: 0; font-size: 18px; }
.pc-body { display: flex; flex: 1; min-height: 0; }

/* ============ 左侧模块导航 ============ */
.pc-nav {
  width: var(--pc-nav-width);
  flex-shrink: 0;
  border-right: 1px solid #eef0f3;
  padding: 12px 8px;
  overflow-y: auto;
  background: #fafbfc;
}
.pc-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  background: none;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  color: #4b5563;
  text-align: left;
}
.pc-nav-item:hover { background: #eef2f7; }
.pc-nav-item.active { background: #e8f0fe; color: #2563eb; font-weight: 600; }
.pc-nav-ico { width: 18px; height: 18px; display: inline-flex; flex-shrink: 0; }
.pc-nav-ico svg { width: 18px; height: 18px; }
.pc-nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  padding: 1px 6px;
  line-height: 16px;
}

/* ============ 右侧内容区：单模块占满 ============ */
.pc-content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: var(--pc-content-padding);
  box-sizing: border-box;
}
.pc-content > .pc-section:last-child { margin-bottom: 0; }

.pc-section {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: var(--pc-section-radius);
  padding: var(--pc-section-padding);
  margin-bottom: var(--pc-section-gap);
}
.pc-section:last-child { margin-bottom: 0; }

.pc-sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #1f2937;
}
.pc-sec-ico { width: 20px; height: 20px; color: #2563eb; display: inline-flex; flex-shrink: 0; }
.pc-sec-ico svg { width: 20px; height: 20px; }

/* ============ 通用：信息行 / 表单 / 提示 ============ */
.pc-info-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px dashed #f1f3f5;
  font-size: 14px;
}
.pc-info-row:last-of-type { border-bottom: none; }
.pc-info-label { width: 120px; color: #8a9099; flex-shrink: 0; }
.pc-info-value { color: #222; flex: 1; word-break: break-all; }

.pc-textarea { min-height: 76px; resize: vertical; line-height: 1.5; }
.pc-hint { font-size: 12px; color: #9aa0a6; margin-top: 6px; }
.pc-actions { margin-top: 14px; display: flex; gap: 10px; }

.pc-pending {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}
.pc-pending-tag {
  display: inline-block;
  background: #f59e0b;
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  padding: 2px 9px;
  margin-bottom: 8px;
}
.pc-pending-reason { font-size: 13px; color: #666; margin-top: 4px; }

/* ============ 实时绩效大字 ============ */
.pc-score-card {
  text-align: center;
  padding: 22px 18px;
  background: linear-gradient(135deg, #eef4ff, #f8faff);
  border-radius: var(--pc-section-radius);
}
.pc-score-label { font-size: 13px; color: #64748b; }
.pc-score-big {
  font-size: 66px;
  font-weight: 800;
  line-height: 1.1;
  color: #1d4ed8;
  margin: 6px 0;
}
.pc-score-level {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  padding: 4px 18px;
  border-radius: 20px;
}
.pc-trend { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 600; }
.pc-trend.up { color: #16a34a; }
.pc-trend.down { color: #dc2626; }
.pc-trend.flat { color: #9aa0a6; }

/* ============ 通知中心 ============ */
.pc-notif-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pc-notif-count { font-size: 13px; color: #888; }
.pc-notif-list { display: flex; flex-direction: column; gap: 8px; }
.pc-notif-item {
  display: flex;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s;
}
.pc-notif-item:hover { background: #f1f5f9; }
.pc-notif-item.unread { background: #eff6ff; border-color: #bfdbfe; }
.pc-notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  margin-top: 6px;
  flex-shrink: 0;
}
.pc-notif-item.unread .pc-notif-dot { background: #2563eb; }
.pc-notif-main { flex: 1; min-width: 0; }
.pc-notif-title { font-size: 14px; font-weight: 600; color: #1f2937; }
.pc-notif-content { font-size: 13px; color: #555; margin: 3px 0; line-height: 1.5; word-break: break-word; }
.pc-notif-time { font-size: 12px; color: #9aa0a6; }

/* 通知中心：加载中 / 加载失败 状态（响应式，适配桌面与移动端） */
.notif-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 20px; color: var(--text-muted); }
.notif-spinner { width: 26px; height: 26px; border: 3px solid #e2e8f0; border-top-color: var(--accent-blue, #2563eb); border-radius: 50%; animation: notif-spin .7s linear infinite; }
@keyframes notif-spin { to { transform: rotate(360deg); } }
.notif-loading-text { font-size: 13px; }

.notif-error { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 44px 20px; text-align: center; }
.notif-error-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(239, 68, 68, .10); color: #ef4444; }
.notif-error-icon svg { width: 22px; height: 22px; }
.notif-error-text { font-size: 14px; color: #475569; }
.notif-error .btn { min-width: 96px; }

/* ============ 审核待办 ============ */
.pc-review-card {
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.pc-review-card:last-child { margin-bottom: 0; }
.pc-review-title { font-weight: 600; color: #1f2937; }
.pc-review-detail { font-size: 13px; color: #555; margin: 4px 0; }

/* ============ 等级配色 ============ */
.lv-excellent { color: #15803d !important; background: #dcfce7 !important; }
.lv-good { color: #1d4ed8 !important; background: #dbeafe !important; }
.lv-pass { color: #0d9488 !important; background: #ccfbf1 !important; }
.lv-warn { color: #b45309 !important; background: #fef3c7 !important; }
.lv-fail { color: #b91c1c !important; background: #fee2e2 !important; }

/* ============ 顶栏：可点击账户名 + 通知铃铛 ============ */
.user-badge.clickable { cursor: pointer; }
.user-badge.clickable:hover { background: #eef2f7; }
.topbar-bell { position: relative; }
.bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  padding: 0 4px;
  line-height: 14px;
  min-width: 14px;
  text-align: center;
  font-weight: 600;
}

/* ============ 覆盖全局 .modal-box 默认值（避免溢出冲突） ============ */
.modal-box.pc-modal {
  max-width: var(--pc-modal-max-width);
  max-height: var(--pc-modal-max-height);
  overflow: hidden;            /* 自身不滚；内容滚动交给 .pc-content */
}

/* ============ 响应式：小屏自动收缩 ============ */
@media (max-width: 960px) {
  :root {
    --pc-modal-width: 100%;
    --pc-modal-max-width: 100%;
    --pc-modal-height: 92vh;
    --pc-modal-max-height: 92vh;
    --pc-nav-width: 160px;
  }
}
