/* ============ 员工自助 ESS H5 门户样式 v1 ============ */
:root {
  --ess-primary: #40B5B5;
  --ess-primary-dark: #2E9E9E;
  --ess-bg: #f4f6f8;
}
* { box-sizing: border-box; }
[v-cloak] { display: none; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px; color: #1f2937; background: var(--ess-bg);
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--ess-bg); }

/* ---------- 登录 ---------- */
.m-login { padding: 90px 28px 0; }
.m-login-logo { display: block; width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; }
.m-login-title { text-align: center; font-size: 22px; font-weight: 700; color: #134e4e; }
.m-login-sub { text-align: center; font-size: 13px; color: #94a3a3; margin: 6px 0 34px; }
.m-input { margin-bottom: 14px; }
.m-login-btn { width: 100%; margin-top: 6px; background: var(--ess-primary); border-color: var(--ess-primary); }
.m-login-btn:hover { background: var(--ess-primary-dark); border-color: var(--ess-primary-dark); }
.m-login-tip { text-align: center; font-size: 13px; color: #b0baba; margin-top: 18px; }

/* ---------- 未绑定 ---------- */
.m-empty-wrap { padding: 100px 24px; text-align: center; }
.m-empty-wrap .el-button { margin: 6px; }

/* ---------- 子页面顶栏 ---------- */
.m-subbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 14px;
  background: var(--ess-primary); color: #fff; font-size: 16px; font-weight: 600;
}
.m-subbar-back { font-size: 22px; cursor: pointer; }
.m-subbody { padding: 12px 12px 24px; }

/* ---------- 卡片 ---------- */
.m-card {
  background: #fff; border-radius: 12px; padding: 14px;
  margin-bottom: 12px; box-shadow: 0 1px 4px rgba(20, 60, 60, .05);
}
.m-card-title { font-size: 15px; font-weight: 600; color: #134e4e; margin-bottom: 10px; }
.m-card-empty { color: #b0baba; text-align: center; padding: 14px 0; font-size: 14px; }
.m-click { cursor: pointer; }
.m-tip { font-size: 13px; color: #98a6a6; margin-top: 8px; line-height: 1.6; }
.m-block-btn { width: 100%; background: var(--ess-primary); border-color: var(--ess-primary); }
.m-block-btn:hover { background: var(--ess-primary-dark); border-color: var(--ess-primary-dark); }

.m-line-item { padding: 9px 0; border-bottom: 1px solid #f2f5f5; }
.m-line-item:last-child { border-bottom: none; }
.m-line-main { font-size: 15px; font-weight: 500; color: #1f2937; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.m-line-sub { font-size: 13px; color: #93a3a3; margin-top: 3px; }

/* ---------- 头像 ---------- */
.m-avatar, .m-avatar-lg {
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ess-primary), var(--ess-primary-dark));
  color: #fff; font-weight: 700;
}
.m-avatar { width: 52px; height: 52px; font-size: 22px; }
.m-avatar-lg { width: 62px; height: 62px; font-size: 26px; }

/* ---------- 首页头部 ---------- */
.m-hero {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--ess-primary), #2c8f8f);
  color: #fff; padding: 22px 16px; border-radius: 0 0 18px 18px;
}
.m-hero-info { flex: 1; min-width: 0; }
.m-hero-name { font-size: 19px; font-weight: 700; }
.m-hero-dept { font-size: 13px; opacity: .88; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-hero-arrow { font-size: 20px; opacity: .85; cursor: pointer; }

/* ---------- 首页快捷入口 ---------- */
.m-quick {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  background: #fff; border-radius: 12px; padding: 16px 8px; margin: -14px 12px 12px;
  position: relative; box-shadow: 0 2px 10px rgba(20, 60, 60, .08);
}
.m-quick-item { text-align: center; font-size: 13px; color: #4b5563; cursor: pointer; }
.m-quick-ic {
  width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 服务九宫格 ---------- */
.m-svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px; }
.m-svc-item {
  background: #fff; border-radius: 12px; padding: 18px 8px; text-align: center;
  font-size: 14px; color: #374151; cursor: pointer;
  box-shadow: 0 1px 4px rgba(20, 60, 60, .05);
}
.m-svc-item:active { background: #f0fafa; }
.m-svc-item .el-icon { margin-bottom: 8px; }

/* ---------- 消息 ---------- */
.m-dot { width: 8px; height: 8px; border-radius: 50%; background: #f56c6c; display: inline-block; margin-right: 6px; flex-shrink: 0; }
.m-msg-content { font-size: 14px; color: #6b7280; margin-top: 4px; line-height: 1.6; word-break: break-all; }
.m-unread { background: #f8fdfd; }

/* ---------- 我的 ---------- */
.m-mine-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 2px; border-bottom: 1px solid #f2f5f5; font-size: 15px; cursor: pointer;
}
.m-mine-item:last-child { border-bottom: none; }
.m-mine-item .el-icon { color: #c0cccc; }
.m-danger { color: #f56c6c; }

/* ---------- 底部导航 ---------- */
.m-body { padding-bottom: 66px; }
.m-tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; height: 56px;
  display: flex; background: #fff; border-top: 1px solid #eef2f2; z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
}
.m-tabbar-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 13px; color: #9aa8a8; cursor: pointer; position: relative;
}
.m-tabbar-item.active { color: var(--ess-primary-dark); font-weight: 600; }
.m-badge {
  position: absolute; top: 4px; right: 50%; margin-right: -20px;
  min-width: 16px; height: 16px; border-radius: 8px; background: #f56c6c; color: #fff;
  font-size: 11px; font-style: normal; line-height: 16px; text-align: center; padding: 0 4px;
}

/* ---------- 档案详情 ---------- */
.m-profile-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.m-profile-name { font-size: 17px; font-weight: 700; color: #134e4e; }
.m-profile-meta { font-size: 13px; color: #93a3a3; margin-top: 4px; }
.m-desc .el-descriptions__label { width: 86px; font-size: 14px; }

/* ---------- 工资条 ---------- */
.m-payslip-row { display: flex; justify-content: space-between; align-items: center; }
.m-payslip-month { font-size: 16px; font-weight: 600; color: #134e4e; }
.m-payslip-net { font-size: 19px; font-weight: 700; color: var(--ess-primary-dark); }

/* ---------- 考勤 ---------- */
.m-shift-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin: 0 6px 0 10px; }

/* ---------- 绩效 ---------- */
.m-perf-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.m-perf-score { font-size: 22px; font-weight: 700; color: var(--ess-primary-dark); }

/* ---------- 学分 ---------- */
.m-credit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.m-credit-cell { background: #f4fbfb; border-radius: 10px; padding: 12px; text-align: center; }
.m-credit-num { font-size: 22px; font-weight: 700; color: var(--ess-primary-dark); }
.m-credit-lbl { font-size: 13px; color: #8a9a9a; margin-top: 2px; }

/* ---------- 证明信 ---------- */
.cert-paper {
  position: relative; background: #fff; border: 1px solid #e5e7eb;
  padding: 26px 22px; font-family: SimSun, "Songti SC", serif; overflow: hidden;
}
.cert-title { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: 6px; margin-bottom: 20px; }
.cert-body { font-size: 15px; line-height: 2; color: #111; }
.cert-table { border-collapse: collapse; margin: 8px 0; width: 100%; }
.cert-table th, .cert-table td { border: 1px solid #666; padding: 5px 10px; text-align: center; font-size: 14px; }
.cert-footer { margin-top: 34px; text-align: right; font-size: 15px; line-height: 2; }
.cert-wm {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-28deg);
  font-size: 26px; color: rgba(0, 0, 0, .06); white-space: nowrap; pointer-events: none;
}

/* ---------- 弹窗移动端适配 ---------- */
.m-dlg { width: 92% !important; max-width: 560px; border-radius: 14px; }
.m-dlg .el-dialog__body { padding: 12px 18px; }
