/* 智聘测评系统 · 美化增强层
 * 叠加在 style.css 之上（index.html 中后链接，同特异性后写胜出），全部为增量规则，
 * 不改动原有视觉基线；任一条规则删除即可回滚，不影响既有功能。
 */

/* ============ 1. 入场动效（卡片 / 统计卡 / 弹窗 / 提示） ============ */
@keyframes zp-fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes zp-pop {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes zp-maskIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes zp-toastIn {
  from { opacity: 0; transform: translate(-50%, -14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* 卡片与统计卡轻量回放入场；用 backwards 让动画结束后交还 transform 给 :hover 等态 */
.card,
.stat,
.stat-card {
  animation: zp-fadeUp .5s cubic-bezier(.2, .8, .3, 1) backwards;
}
/* 网格 / 容器内的子项交错延迟，营造层次感 */
.content > *:nth-child(1) { animation-delay: .00s; }
.content > *:nth-child(2) { animation-delay: .05s; }
.content > *:nth-child(3) { animation-delay: .10s; }
.content > *:nth-child(4) { animation-delay: .15s; }
.content > *:nth-child(n+5) { animation-delay: .20s; }
.grid > *:nth-child(1) { animation-delay: .03s; }
.grid > *:nth-child(2) { animation-delay: .07s; }
.grid > *:nth-child(3) { animation-delay: .11s; }
.grid > *:nth-child(4) { animation-delay: .15s; }
.grid > *:nth-child(n+5) { animation-delay: .19s; }
.stat-cards > *:nth-child(1) { animation-delay: .03s; }
.stat-cards > *:nth-child(2) { animation-delay: .08s; }
.stat-cards > *:nth-child(3) { animation-delay: .13s; }
.stat-cards > *:nth-child(4) { animation-delay: .18s; }
.stat-cards > *:nth-child(n+5) { animation-delay: .23s; }

/* 弹窗 / 遮罩 / 提示入场 */
.mask  { animation: zp-maskIn .2s ease backwards; }
.modal { animation: zp-pop .28s cubic-bezier(.2, .8, .3, 1) backwards; }
.toast { animation: zp-toastIn .3s cubic-bezier(.2, .8, .3, 1) backwards; }

/* ============ 2. 统计卡图标徽标 ============ */
.stat .si,
.stat-card .si {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  background: linear-gradient(135deg, var(--brand-light), #fff);
  border: 1px solid #DCE7F3; color: var(--brand);
  box-shadow: 0 2px 6px rgba(24, 95, 165, .08);
}
.stat .value,
.stat-card .sc-val {
  font-variant-numeric: tabular-nums;
  letter-spacing: .3px;
}

/* ============ 3. 表格：吸顶表头 + 斑马纹 + 顺滑悬停 ============ */
.content table thead th {
  position: sticky; top: 0; z-index: 2;
  background: #F4F7FB;
  box-shadow: inset 0 -1px 0 var(--border);
}
.content table tbody tr:nth-child(even) { background: #FAFBFD; }
.content table tbody tr { transition: background .15s ease; }
.content table tbody tr:hover { background: #EEF4FB; }

/* ============ 4. 按钮按压微反馈 ============ */
.btn:active { transform: translateY(1px); }

/* ============ 5. 空状态微调 ============ */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 140px; }

/* ============ 6. 仪表盘欢迎横幅 ============ */
.dash-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; padding: 20px 24px; border-radius: var(--radius);
  background: linear-gradient(120deg, #0C447C 0%, #185FA5 55%, #2E7BD6 100%);
  color: #fff; box-shadow: 0 10px 26px rgba(12, 68, 124, .22);
  animation: zp-fadeUp .5s cubic-bezier(.2, .8, .3, 1) backwards;
}
.dash-hero .dh-hi { font-size: 20px; font-weight: 600; }
.dash-hero .dh-sub { margin-top: 6px; font-size: 13px; opacity: .92; }
.dash-hero .dh-sub b { font-weight: 600; }
.dash-hero .dh-date {
  font-size: 13px; opacity: .9; white-space: nowrap;
  background: rgba(255, 255, 255, .12); padding: 8px 14px; border-radius: 10px;
}
@media (max-width: 640px) {
  .dash-hero { flex-direction: column; align-items: flex-start; }
}

/* ============ 6.5 测评批量发放：候选人勾选区 ============ */
.cand-pick {
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  max-height: 240px; overflow-y: auto; padding: 6px;
}
.cand-pick-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}
.cand-pick-item:hover { background: #F1F5F9; }
.cand-pick-item input { width: 15px; height: 15px; cursor: pointer; flex: none; }

/* ============ 7. 登录页品牌分屏 ============ */
.login-wrap { background: linear-gradient(135deg, #0C447C 0%, #185FA5 55%, #378ADD 100%); }
.login-split {
  display: flex; width: min(880px, 94vw); min-height: 520px;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(12, 68, 124, .3);
}
.login-aside {
  flex: 1 1 46%; padding: 40px 36px; color: #fff;
  background: linear-gradient(160deg, #0C447C 0%, #185FA5 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
/* 「智聘人才云」品牌区居中：整块（含 TALENTHUB 英文）水平居中于登录页左栏 */
.login-aside .brand {
  font-size: 22px; font-weight: 700; letter-spacing: 1px;
  text-align: center; width: 100%;
}
.login-aside .brand small {
  display: block; font-size: 12px; font-weight: 400; opacity: .8;
  margin-top: 4px; letter-spacing: 2px; text-align: center;
}
/* 与品牌呼应的分隔线，居中排版更完整 */
.login-aside .brand::after {
  content: ''; display: block; width: 46px; height: 3px; border-radius: 2px;
  margin: 12px auto 0; background: rgba(255, 255, 255, .55);
}
.login-aside h2 { font-size: 26px; font-weight: 600; line-height: 1.4; margin: 18px 0; }
.login-aside p { font-size: 14px; line-height: 1.9; opacity: .9; }
.login-feats { list-style: none; padding: 0; margin: 18px 0 0; }
.login-feats li { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; opacity: .95; }
.login-feats li .fi {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .14); font-size: 14px;
}
.login-aside .copy { font-size: 12px; opacity: .6; }
.login-main {
  flex: 1 1 54%; padding: 40px 38px;
  display: flex; flex-direction: column; justify-content: center;
}
.login-main h1 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.login-main .sub { color: var(--text-3); font-size: 13px; margin-bottom: 22px; }
.login-main .login-tip { margin-top: 18px; }
@media (max-width: 720px) {
  .login-split { flex-direction: column; min-height: 0; }
  .login-aside { display: none; }   /* 窄屏只留表单，品牌信息省略 */
}

/* ============ 7b. 登录页科技感动效（粒子网络 / 流光 / 光晕，纯增量） ============ */
.login-aside {
  position: relative; overflow: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(160deg, #0C447C 0%, #185FA5 50%, #2E7BD6 100%);
  background-size: 42px 42px, 42px 42px, 220% 220%;
  background-position: 0 0, 0 0, 0% 50%;
  animation: zp-loginGrad 16s ease infinite;
}
@keyframes zp-loginGrad {
  0%   { background-position: 0 0, 0 0, 0% 50%; }
  50%  { background-position: 0 0, 0 0, 100% 50%; }
  100% { background-position: 0 0, 0 0, 0% 50%; }
}
/* 粒子网络画布：置于品牌面板最底层 */
#loginFx {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 0; pointer-events: none;
}
/* 内容层置于画布与光晕之上 */
.login-aside > * { position: relative; z-index: 2; }
/* 两枚柔光晕缓慢漂移，制造景深 */
.login-aside::before,
.login-aside::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(40px); z-index: 1; pointer-events: none;
}
.login-aside::before {
  width: 280px; height: 280px; top: -70px; right: -50px;
  background: radial-gradient(circle, rgba(120,190,255,.55), rgba(120,190,255,0) 70%);
  animation: zp-orbA 12s ease-in-out infinite alternate;
}
.login-aside::after {
  width: 240px; height: 240px; bottom: -60px; left: -40px;
  background: radial-gradient(circle, rgba(90,150,255,.45), rgba(90,150,255,0) 70%);
  animation: zp-orbB 15s ease-in-out infinite alternate;
}
@keyframes zp-orbA { from { transform: translate(0,0); } to { transform: translate(-34px, 44px); } }
@keyframes zp-orbB { from { transform: translate(0,0); } to { transform: translate(44px, -34px); } }
.login-aside .brand { text-shadow: 0 2px 18px rgba(120,190,255,.45); }

/* ============ 8. 尊重系统「减少动态效果」偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  .card, .stat, .stat-card, .mask, .modal, .toast, .dash-hero,
  .content > * , .grid > *, .stat-cards > *,
  .login-aside, #loginFx, .login-aside::before, .login-aside::after {
    animation: none !important;
  }
}
