:root {
  --bg: #f6f5fb;
  --panel: #ffffff;
  --border: #e9e7f2;
  --border-strong: #d8d4e8;
  --text: #1a1730;
  --text-2: #514d6b;
  --text-3: #9793ad;

  /* 高级紫主色 */
  --primary: #6d5ae6;
  --primary-deep: #5543d0;
  --primary-soft: #f1eefe;
  --primary-ring: rgba(109, 90, 230, .16);
  --grad: linear-gradient(135deg, #6d5ae6 0%, #8b6ef5 55%, #a17bfb 100%);

  --success: #0f9b6c;
  --success-soft: #e8f8f1;
  --warn: #b76e00;
  --warn-soft: #fdf5e6;
  --danger: #dc3b3b;
  --danger-soft: #fdf0f0;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(26, 23, 48, .04);
  --shadow: 0 1px 3px rgba(26, 23, 48, .05), 0 10px 28px -14px rgba(26, 23, 48, .14);
  --shadow-lg: 0 2px 6px rgba(26, 23, 48, .06), 0 24px 56px -20px rgba(26, 23, 48, .22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }

/* ================= 登录页 ================= */
.login-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(12, 16, 38, .55), rgba(12, 16, 38, .68)),
    url('/images/login-bg.jpg') center / cover no-repeat;
}
/* 两团柔光，营造纵深 */
.login-wrap::before,
.login-wrap::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}
.login-wrap::before {
  width: 620px; height: 620px;
  top: -230px; right: -140px;
  background: radial-gradient(circle, rgba(126, 96, 255, .30) 0%, rgba(126, 96, 255, 0) 68%);
  animation: float1 16s ease-in-out infinite;
}
.login-wrap::after {
  width: 520px; height: 520px;
  bottom: -200px; left: -120px;
  background: radial-gradient(circle, rgba(86, 132, 255, .22) 0%, rgba(86, 132, 255, 0) 68%);
  animation: float2 20s ease-in-out infinite;
}
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-26px, 22px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(24px, -20px); } }

.login-card {
  position: relative;
  z-index: 2;
  width: 412px;
  padding: 40px 38px 30px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  animation: cardIn .5s cubic-bezier(.22,.9,.3,1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.login-mark {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--grad);
  box-shadow: 0 8px 22px -6px rgba(109, 90, 230, .55), inset 0 1px 0 rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex: 0 0 auto;
}
.login-mark svg { display: block; }
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}
.login-card h1 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.4px; color: var(--text); }
.login-card .sub { margin-top: 10px; font-size: 14.5px; font-weight: 700; letter-spacing: .4px; line-height: 1.6; background: linear-gradient(100deg, #5543d0 0%, #6d5ae6 50%, #8b6ef5 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--primary-deep); }
.login-card form { margin-top: 26px; }
.login-card label { display: block; margin: 16px 0 7px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.login-card input {
  width: 100%; height: 44px; padding: 0 14px;
  /* iOS Safari 对字号 <16px 的输入框会在聚焦时强制放大整页，故显式设为 16px */
  font-size: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255,255,255,.9);
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.login-btn {
  width: 100%; height: 44px; margin-top: 26px;
  border: 0; border-radius: 12px;
  background: var(--grad);
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 3px;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(109, 90, 230, .7);
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.login-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(109, 90, 230, .8); filter: brightness(1.04); }
.login-btn:active:not(:disabled) { transform: translateY(0); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; }
.login-hint {
  margin-top: 22px; padding: 10px 13px;
  background: rgba(241, 238, 254, .7);
  border: 1px solid rgba(109, 90, 230, .12);
  border-radius: 10px;
  font-size: 12px; color: var(--text-2); line-height: 1.8;
}
.login-foot { margin-top: 18px; text-align: center; font-size: 11.5px; color: var(--text-3); letter-spacing: .3px; }

/* ================= 布局 ================= */
.topbar {
  height: 58px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 620; font-size: 15px; letter-spacing: -.2px; }
.brand-logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -6px rgba(109, 90, 230, .7);
}
.brand-logo svg { display: block; }
.user-box { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.honor { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: center; min-width: 0; overflow: hidden; }
.honor-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); background: rgba(109, 90, 230, .08); border: 1px solid rgba(109, 90, 230, .18); padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.honor-item b { color: var(--text); font-weight: 600; }
.honor-item .ic { font-size: 13px; line-height: 1; }
.honor-empty { font-size: 12.5px; color: var(--text-3); }
.honor-gate { color: var(--text-3); font-size: 11.5px; margin-left: -1px; }

.layout { display: flex; align-items: flex-start; min-height: calc(100vh - 58px); }
.sidebar {
  width: 224px; flex: 0 0 224px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
  border-right: 1px solid var(--border);
  padding: 14px 14px 24px;
  position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto;
}
.nav-group { margin-bottom: 6px; }
.nav-group-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px; font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 16px 12px 8px;
  position: relative;
}
.nav-group-title::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .35;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  padding: 10px 13px 10px 11px; border: none; background: transparent;
  border-radius: var(--radius-sm); color: var(--text-2);
  cursor: pointer; margin-bottom: 4px;
  position: relative;
  transition: background .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.nav-item .nav-icon {
  flex: 0 0 18px;
  color: var(--text-3);
  transition: color .15s ease, transform .15s ease;
}
.nav-item .nav-label { position: relative; top: .5px; }
.nav-item:hover {
  background: rgba(109, 90, 230, .06);
  color: var(--text);
  transform: translateX(2px);
}
.nav-item:hover .nav-icon { color: var(--primary); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(109, 90, 230, .12) 0%, rgba(109, 90, 230, .05) 100%);
  color: var(--primary); font-weight: 650;
  box-shadow: 0 1px 2px var(--primary-ring);
}
.nav-item.active .nav-icon { color: var(--primary); transform: scale(1.05); }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 3px; height: 18px;
  background: var(--grad);
  border-radius: 0 4px 4px 0;
  transform: translateY(-50%);
}

.main { flex: 1; padding: 24px 26px 64px; min-width: 0; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 19px; font-weight: 640; letter-spacing: -.3px; }
.page-head .desc { color: var(--text-3); font-size: 13px; margin-top: 3px; }

/* ================= 卡片 / 表单 ================= */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
/* 顶部渐变线用伪元素做，避免 border-image 抹掉父级 border-radius */
.card-accent { position: relative; }
.card-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  border-radius: var(--radius) var(--radius) 0 0;
  pointer-events: none;
}
.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 620;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(180deg, #fdfcff 0%, #fbfaff 100%);
  border-top-left-radius: 14px;   /* 跟随卡片圆角，否则 card-head 自带底色会被卡片圆角"咬"出小三角 */
  border-top-right-radius: 14px;
}
.head-with-sub { display: flex; align-items: baseline; gap: 10px; }
.head-sub { font-size: 12px; font-weight: 400; color: var(--text-3); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; color: var(--text-2); font-weight: 500; }
input, select, textarea {
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }

.btn {
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #fff;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.btn:hover { background: #f8f7fd; border-color: #c8c2e4; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--grad); border-color: transparent; color: #fff; font-weight: 550;
  box-shadow: 0 8px 20px -10px rgba(109, 90, 230, .8);
}
.btn-primary:hover { background: var(--grad); border-color: transparent; filter: brightness(1.05); box-shadow: 0 12px 26px -10px rgba(109, 90, 230, .9); }
.btn-danger { color: var(--danger); border-color: #f5c2c2; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: #eea9a9; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

.chip-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: #fff;
  cursor: pointer; font-size: 12.5px; color: var(--text-2);
  transition: all .15s;
}
.chip:hover { border-color: #c3bce6; color: var(--text); }
.chip.active {
  background: var(--primary-soft); border-color: rgba(109, 90, 230, .35);
  color: var(--primary); font-weight: 600;
}

/* ================= KPI ================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.kpi {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.kpi:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grad); opacity: .85;
}
.kpi .label { font-size: 12px; color: var(--text-3); }
.kpi .value { font-size: 23px; font-weight: 660; margin-top: 4px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* ================= 表格 ================= */
.table-scroll { overflow-x: auto; }
/* separate + spacing:0：让单元格 border-radius 真正生效（collapse 下 radius 无效，
   表头色块会被渲染成圆角、与直角边框打架）。只给 border-bottom，故不会出现双线。 */
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th, table.data td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
}
table.data thead th {
  background: linear-gradient(180deg, #f1ebfc 0%, #e6dcf7 100%);
  color: var(--text-2); font-weight: 700; font-size: 12.5px;
  position: sticky; top: 0; z-index: 1;
  border-bottom: 2px solid #d3c4ec;
  background-clip: padding-box;
}
/* 表头第一行色块顶部圆角与卡片圆角对齐——卡片 overflow:hidden 会"咬"掉表头直角，
   让色块与卡片同圆角才能视觉填满、不留白 */
table.data thead th:first-child { border-top-left-radius: 14px; }
table.data thead th:last-child  { border-top-right-radius: 14px; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #faf9ff; }
table.data td.num, table.data th.num { text-align: center; font-variant-numeric: tabular-nums; }
table.data tfoot td {
  font-weight: 700;
  background: linear-gradient(180deg, #f1ebfc 0%, #e6dcf7 100%);
  border-top: 2px solid #d3c4ec;
  background-clip: padding-box;
}
table.data tfoot td:first-child { border-bottom-left-radius: 14px; }
table.data tfoot td:last-child  { border-bottom-right-radius: 14px; }
tr.row-total td { font-weight: 700; background: #f1ebfc; }
/* 分组标题行（人员 × 项目 汇总用） */
table.data tr.grp-head td {
  background: linear-gradient(90deg, #f2effe 0%, #f8f7ff 100%);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
  font-weight: 650; color: var(--text); padding: 9px 12px;
}
table.data tr.grp-head:first-child td { border-top: none; }
.grp-sub { margin-left: 12px; font-weight: 400; font-size: 12px; color: var(--text-2); }
.empty { padding: 38px; text-align: center; color: var(--text-3); }

.rate-pill {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.rate-pill.good { background: var(--success-soft); color: var(--success); }
.rate-pill.mid { background: var(--warn-soft); color: var(--warn); }
.rate-pill.low { background: var(--danger-soft); color: var(--danger); }

.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; border: 1px solid transparent; }
.tag-admin { background: #f1eefe; color: #5b3fd0; border-color: #ddd3fb; }
.tag-director { background: #fdf3e6; color: #b76e00; border-color: #f7e0bc; }
.tag-manager { background: #eef1fe; color: #3b5bd6; border-color: #d3dcfa; }
.tag-operator { background: #f4f3f8; color: var(--text-2); border-color: var(--border); }
.tag-off { background: var(--danger-soft); color: var(--danger); border-color: #f5c2c2; }
.tag-ok { background: var(--success-soft); color: var(--success); border-color: #b6e8d3; }

/* ================= 弹窗 ================= */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(26, 23, 48, .42);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 60; padding: 20px;
}
.modal {
  background: #fff; border-radius: 16px; width: 540px; max-width: 100%;
  max-height: 86vh; overflow: auto; box-shadow: var(--shadow-lg);
  animation: cardIn .22s cubic-bezier(.22,.9,.3,1) both;
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 620; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.check-item { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 7px; }
.check-item:hover { background: #f8f7fd; }
.check-item input { width: 15px; height: 15px; }

/* 项目成员弹窗：人多时整体滚动，避免双层滚动条 */
.mem-scroll { max-height: 46vh; overflow: auto; }
.mem-scroll .check-list { max-height: none; border: none; padding: 0; }
.mem-ops { display: flex; gap: 8px; margin-top: 10px; }

/* ================= 提示 ================= */
#toastBox { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #fff; border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 11px 15px; box-shadow: var(--shadow-lg);
  min-width: 210px;
  animation: slideIn .2s cubic-bezier(.22,.9,.3,1);
}
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--danger); }
@keyframes slideIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.funnel-warn {
  margin-top: 12px; padding: 12px 15px;
  background: var(--danger-soft);
  border: 1px solid #f5c2c2;
  border-left: 3px solid var(--danger);
  border-radius: var(--radius-sm);
}
.fw-title { font-weight: 620; color: var(--danger); font-size: 13px; margin-bottom: 5px; }
.funnel-warn ul { margin: 0; padding-left: 19px; color: var(--text-2); font-size: 13px; }
.funnel-warn li { margin: 2px 0; }
.fw-foot { margin-top: 6px; font-size: 12px; color: var(--text-3); }

/* 共享账号提示条 */
.warn-line {
  margin-bottom: 10px; padding: 8px 11px;
  background: var(--warn-soft);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-sm);
  color: var(--warn); font-size: 13px; font-weight: 560;
}

.empty-guide { padding: 46px 24px; text-align: center; }
.eg-icon { font-size: 34px; margin-bottom: 12px; }
.eg-title { font-size: 15px; font-weight: 620; margin-bottom: 6px; }
.eg-desc { font-size: 13px; color: var(--text-3); margin-bottom: 20px; }

.hint { font-size: 12.5px; color: var(--text-3); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; }
.funnel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 14px; }
.calc-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 12px; margin-top: 16px; padding: 14px 16px;
  background: linear-gradient(135deg, #f9f7ff 0%, #f6f5fd 100%);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.calc-row .item .label { font-size: 12px; color: var(--text-3); }
.calc-row .item .value { font-size: 18px; font-weight: 640; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .topbar {
    padding: 0 14px 7px; height: auto; min-height: 54px;
    flex-wrap: wrap; row-gap: 0;
  }
  .brand { font-size: 14px; }
  /* 荣誉榜手机端不再隐藏：换到顶栏第二行，左右滑动查看 */
  .honor {
    order: 3; flex: 1 0 100%; justify-content: flex-start;
    margin-top: 5px; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .honor::-webkit-scrollbar { display: none; }
  .honor-item { font-size: 12px; padding: 3px 10px; flex: none; }
  .honor-none { display: none; }
  .user-box { font-size: 12px; gap: 8px; }
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: static;
    display: flex; gap: 6px; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border);
  }
  .nav-item { width: auto; white-space: nowrap; }
  .nav-group-title { display: none; }
  .main { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .login-card { width: calc(100% - 32px); margin: 16px; padding: 32px 24px 24px; }
}

@media (max-width: 480px) {
  .topbar { padding: 0 12px 6px; }
  .brand { font-size: 13px; }
  .honor-item { font-size: 11.5px; padding: 3px 9px; }
  .user-box { font-size: 11.5px; }
  .main { padding: 14px 14px 48px; }
  .funnel-grid { grid-template-columns: 1fr 1fr; }
  .calc-row { grid-template-columns: 1fr 1fr; }
  .page-head h2 { font-size: 17px; }
  /* 手机端登录页整体放大：触控热区 ≥48px，字号同步加大 */
  .login-card { width: calc(100% - 24px); margin: 12px; padding: 30px 20px 22px; border-radius: 18px; }
  .login-mark { width: 56px; height: 56px; border-radius: 16px; }
  .login-mark svg { width: 32px; height: 32px; }
  .login-brand { gap: 14px; margin-bottom: 20px; }
  .login-card h1 { font-size: 25px; }
  .login-card .sub { margin-top: 12px; font-size: 15.5px; line-height: 1.65; }
  .login-card form { margin-top: 22px; }
  .login-card label { margin: 18px 0 8px; font-size: 13.5px; }
  .login-card input { height: 50px; padding: 0 16px; border-radius: 13px; }
  .login-btn { height: 50px; margin-top: 24px; font-size: 16.5px; letter-spacing: 4px; }
  .login-hint { margin-top: 20px; padding: 12px 14px; font-size: 13px; }
  .login-foot { margin-top: 16px; font-size: 12.5px; }
}

/* ================= 角色头像 ================= */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #f1eefe;
  background: color-mix(in srgb, var(--av) 16%, #fff);
  border: 1.5px solid var(--av);
  font-size: 14px; line-height: 1; flex: 0 0 auto;
  box-shadow: 0 1px 3px rgba(26,23,48,.12);
  vertical-align: middle;
}
.avatar.av-admin { background: linear-gradient(135deg,#fde9c2,#fff4dc); }
.who-name { font-weight: 600; }
.user-box .avatar { margin-right: 2px; }
.u-name { font-weight: 500; }

/* ================= 完成进度 ================= */
.prog {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-width: 94px;
}
.prog::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 6px;
  transform: translateY(-50%);
  background: var(--border); border-radius: 999px;
}
.prog-bar {
  position: relative; z-index: 1; height: 6px; border-radius: 999px;
  background: var(--primary); min-width: 4px;
}
.prog-bar.prog-ok { background: var(--success); }
.prog-bar.prog-mid { background: var(--warn); }
.prog-bar.prog-low { background: var(--danger); }
.prog b { position: relative; z-index: 2; font-variant-numeric: tabular-nums; font-weight: 650; }
.prog i { position: relative; z-index: 2; font-style: normal; color: var(--text-3); font-size: 12px; }

/* ================= 日常页面美化 ================= */
.page-head { position: relative; }
.page-head h2 { position: relative; padding-left: 13px; }
.page-head h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 19px; border-radius: 3px; background: var(--grad);
}
.page-head .desc { padding-left: 13px; }
.kpi {
  background: linear-gradient(135deg, #ffffff 0%, #fbfaff 100%);
}
.kpi::after {
  content: ''; position: absolute; right: -18px; top: -18px;
  width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109,90,230,.10) 0%, rgba(109,90,230,0) 70%);
  pointer-events: none;
}
.kpi .value {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--primary-deep);
}
.card { transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-lg); }
.table-scroll { border-radius: var(--radius-sm); }
table.data tbody tr:nth-child(even) { background: #fcfbff; }
table.data tbody tr:hover { background: #f5f2ff; }
.empty::before { content: '📭'; display: block; font-size: 30px; margin-bottom: 8px; opacity: .5; }

/* ================= 数据填报每日问候 ================= */
.page-greeting {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 520px;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6d5ae6 0%, #a855f7 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(109, 90, 230, .28);
  font-size: 13px; font-weight: 600; line-height: 1.5;
  text-shadow: 0 1px 1px rgba(0,0,0,.08);
  animation: pg-pop .35s ease-out;
}
.page-greeting .pg-emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  font-size: 14px; flex-shrink: 0;
}
.page-greeting .pg-text { flex: 1; }
@keyframes pg-pop {
  from { opacity: 0; transform: translateY(-6px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 768px) {
  .page-greeting {
    max-width: 100%; width: 100%; border-radius: 14px;
    margin-top: 4px;
  }
  .page-head { align-items: flex-start; }
}

/* ============ 数据填报：项目切换卡 + 按日期直填表格 ============ */
.proj-switch {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 6px 2px 10px; scrollbar-width: thin;
}
.proj-chip {
  flex: 0 0 auto; padding: 10px 20px; border-radius: 12px;
  border: 1.5px solid var(--border-strong); background: var(--panel);
  color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s, background .15s;
}
.proj-chip:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.proj-chip.active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(109, 90, 230, .28);
}
table.eg td { padding: 6px 8px; vertical-align: middle; }
table.eg td.eg-date { font-weight: 600; white-space: nowrap; }
table.eg td.eg-conv { color: var(--text-2); white-space: nowrap; }
table.eg td.eg-op { white-space: nowrap; }
table.eg input[type="number"], table.eg input[type="text"] {
  width: 100%; min-width: 84px; padding: 7px 9px;
  border: 1.5px solid var(--border); border-radius: 9px;
  font: inherit; text-align: right; background: var(--panel); color: var(--text);
}
table.eg input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
table.eg input[data-k="remark"] { text-align: left; min-width: 150px; }
table.eg tr.row-dirty td { background: var(--primary-soft); }
table.eg tr.row-dirty .eg-date::after { content: ' ●'; color: var(--primary); font-size: 10px; vertical-align: top; }
table.eg tr.row-flash { animation: egRowFlash 1.4s ease 2; }
@keyframes egRowFlash {
  0%, 100% { background: transparent; }
  40% { background: var(--primary-soft); }
}
table.eg tfoot td { font-weight: 700; background: var(--primary-soft); border-top: 2px solid var(--border-strong); }
@media (max-width: 640px) {
  .proj-chip { padding: 8px 14px; font-size: 13px; }
  table.eg input[type="number"] { min-width: 72px; }
  table.eg input[data-k="remark"] { min-width: 110px; }
}

/* 项目数据明细：表头+非数字列居中，数字列保留右对齐（财务数字阅读习惯） */
.pd-centered table.data { font-variant-numeric: tabular-nums; }
.pd-centered table.data th { text-align: center; }
.pd-centered table.data td { text-align: center; }
.pd-centered table.data td.num,
.pd-centered table.data th.num { text-align: center; }
.pd-centered table.data tfoot td { text-align: center; font-weight: 600; }
.pd-centered table.data tfoot td.num { text-align: center; }

/* PD 明细页卡片头：标题居中，左右各留一列平衡（按钮依然贴右） */
.pd-card-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.pd-card-head > :nth-child(1) { justify-self: start; }
.pd-card-head > :nth-child(2) { justify-self: center; }
.pd-card-head > :nth-child(3) { justify-self: end; }
.pd-centered-title { font-size: 16px; font-weight: 620; }

/* 填报页：项目行表格（运营一次性填自己名下所有项目） */
.eg-by-project td.eg-proj { font-weight: 600; min-width: 90px; }
.eg-by-project td.eg-op { white-space: nowrap; }

