:root {
  --primary: #1F4E79;
  --primary-light: #2b6cb0;
  --primary-soft: #eef3f9;

  --wom: #8b5cf6;        /* 口碑积分 */
  --wom-soft: #f3eefe;
  --act: #0ea5e9;        /* 活动积分 */
  --act-soft: #e6f6fe;
  --conv: #f97316;       /* 转换积分 */
  --conv-soft: #fef1e7;

  --text: #1a202c;
  --muted: #718096;
  --border: #e2e8f0;
  --bg: #f5f7fa;
  --card: #ffffff;
  --ok: #15803d;
  --ok-soft: #eafaf0;
  --warn: #b45309;
  --warn-soft: #fdf6e7;
  --danger: #c02020;
  --danger-soft: #fdeeee;

  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 32, 56, .06), 0 6px 20px rgba(16, 32, 56, .05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ================= 顶栏 ================= */
.topbar {
  background: var(--primary);
  color: #fff;
  padding: 0 22px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(16, 32, 56, .18);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: .3px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,.16);
  display: grid; place-items: center; font-size: 15px;
}
.brand small { font-weight: 400; opacity: .62; font-size: 12px; margin-left: 4px; letter-spacing: 0; }

.topbar .spacer { flex: 1; }

.period-chip {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; display: flex; align-items: center; gap: 6px;
}

.user-switch { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; padding: 6px 13px; border-radius: 20px;
  cursor: pointer; font-size: 13px; font-family: inherit;
  transition: background .16s;
}
.user-btn:hover { background: rgba(255,255,255,.22); }
.avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; color: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.role-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 4px;
  background: rgba(255,255,255,.2);
}

.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(16,32,56,.2);
  min-width: 250px; padding: 7px; display: none; z-index: 60;
}
.user-menu.open { display: block; }
.user-menu .menu-title {
  font-size: 11px; color: var(--muted); padding: 7px 11px 5px;
  text-transform: uppercase; letter-spacing: .6px;
}
.user-menu button {
  width: 100%; text-align: left; background: none; border: none;
  padding: 8px 11px; border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; gap: 9px;
  font-family: inherit; font-size: 13px; color: var(--text);
}
.user-menu button:hover { background: var(--primary-soft); }
.user-menu button.active { background: var(--primary-soft); font-weight: 600; }
.user-menu .u-role { font-size: 11px; color: var(--muted); margin-left: auto; }

/* ================= 布局 ================= */
.layout { display: flex; min-height: calc(100vh - 60px); }

.sidebar {
  width: 194px; background: #fff; border-right: 1px solid var(--border);
  padding: 16px 11px; flex-shrink: 0;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  color: #4a5568; font-size: 13.5px; margin-bottom: 3px;
  border: none; background: none; width: 100%; text-align: left;
  font-family: inherit; transition: all .14s;
}
.nav-item:hover { background: var(--primary-soft); color: var(--primary); }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-item .ico { width: 17px; text-align: center; font-size: 15px; }
.nav-item .badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 600;
}
.nav-item.active .badge { background: rgba(255,255,255,.28); }

.nav-group {
  font-size: 11px; color: var(--muted); padding: 14px 12px 6px;
  letter-spacing: .6px; font-weight: 600;
}

.content { flex: 1; padding: 22px 26px 60px; max-width: 1420px; }

/* ================= 通用 ================= */
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.page-head p { color: var(--muted); font-size: 13px; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.card-head h2 { font-size: 15px; font-weight: 700; color: var(--primary); }
.card-head .sub { font-size: 12px; color: var(--muted); margin-left: auto; }

.btn {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  padding: 7px 15px; border-radius: 7px; cursor: pointer;
  font-family: inherit; font-size: 13px; transition: all .14s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-soft); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-light); color: #fff; border-color: var(--primary-light); }
.btn-ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-ok:hover { background: #166534; color: #fff; border-color: #166534; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c4c4; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ================= 三类积分卡片 ================= */
.type-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.type-card {
  background: var(--card); border-radius: var(--radius); padding: 17px 18px;
  box-shadow: var(--shadow); border-top: 3px solid var(--border);
  position: relative; overflow: hidden;
}
.type-card.t-wom  { border-top-color: var(--wom); }
.type-card.t-act  { border-top-color: var(--act); }
.type-card.t-conv { border-top-color: var(--conv); }

.type-card .tc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.type-card .dot { width: 9px; height: 9px; border-radius: 50%; }
.t-wom  .dot { background: var(--wom); }
.t-act  .dot { background: var(--act); }
.t-conv .dot { background: var(--conv); }
.type-card .tc-name { font-size: 13.5px; font-weight: 600; }
.type-card .tc-count { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.type-card .tc-value { font-size: 31px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.t-wom  .tc-value { color: var(--wom); }
.t-act  .tc-value { color: var(--act); }
.t-conv .tc-value { color: var(--conv); }
.type-card .tc-value span { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.type-card .tc-desc { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* ================= 统计小卡 ================= */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 15px 17px;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .14s, box-shadow .14s;
  border-left: 3px solid transparent;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(16,32,56,.11); }
.stat.active { border-left-color: var(--primary); background: var(--primary-soft); }
.stat .s-label { font-size: 12px; color: var(--muted); margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.stat .s-value { font-size: 25px; font-weight: 700; color: var(--primary); line-height: 1.15; }
.stat .s-unit { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 3px; }

/* ================= 表格 ================= */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: #f8fafc; color: #475569; font-weight: 600; font-size: 12px;
  text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 10px 11px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tbody tr:hover { background: #fafcfe; }
tbody tr.row-clickable { cursor: pointer; }
tbody tr.selected { background: var(--primary-soft); }
tbody tr:last-child td { border-bottom: none; }

/* ================= 标签 ================= */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}
.tag-wom  { background: var(--wom-soft);  color: var(--wom); }
.tag-act  { background: var(--act-soft);  color: #0369a1; }
.tag-conv { background: var(--conv-soft); color: #c2410c; }

.st { padding: 2px 9px; border-radius: 11px; font-size: 11.5px; font-weight: 600; white-space: nowrap; display: inline-block; }
.st-pending   { background: var(--warn-soft);   color: var(--warn); }
.st-approved  { background: var(--ok-soft);     color: var(--ok); }
.st-rejected  { background: var(--danger-soft); color: var(--danger); }
.st-appealing { background: #eef2ff;            color: #4338ca; }

.pts { font-weight: 700; font-size: 14px; }
.pts-pos { color: var(--ok); }
.pts-zero { color: var(--muted); font-weight: 500; }

/* ================= 表单 ================= */
.form-row { margin-bottom: 15px; }
.form-row label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: #374151; }
.form-row label .req { color: var(--danger); margin-left: 2px; }
.form-row label .hint { font-weight: 400; color: var(--muted); margin-left: 5px; font-size: 11.5px; }
input[type=text], input[type=date], input[type=number], textarea, select {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border);
  border-radius: 7px; font-family: inherit; font-size: 13px; color: var(--text);
  background: #fff; transition: border-color .14s, box-shadow .14s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(43,108,176,.11);
}
textarea { resize: vertical; min-height: 66px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.rule-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rule-group { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.rule-group .rg-head {
  padding: 8px 12px; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
}
.rg-wom  .rg-head { background: var(--wom-soft);  color: var(--wom); }
.rg-act  .rg-head { background: var(--act-soft);  color: #0369a1; }
.rg-conv .rg-head { background: var(--conv-soft); color: #c2410c; }
.rule-opt {
  padding: 9px 12px; cursor: pointer; font-size: 12.5px;
  border-top: 1px solid #f1f5f9; display: flex; align-items: center; gap: 8px;
  transition: background .12s;
}
.rule-opt:hover { background: #f8fafc; }
.rule-opt.sel { background: var(--primary-soft); font-weight: 600; }
.rule-opt .r-score { margin-left: auto; font-weight: 700; color: var(--primary); font-size: 12px; white-space: nowrap; }

.score-preview {
  background: linear-gradient(135deg, #f8fbff, #eef4fb);
  border: 1px solid #d6e4f2; border-radius: 9px; padding: 13px 16px;
  display: flex; align-items: center; gap: 16px; margin-bottom: 15px;
}
.score-preview .sp-formula { font-size: 13px; color: #475569; }
.score-preview .sp-total { margin-left: auto; font-size: 27px; font-weight: 800; color: var(--primary); }
.score-preview .sp-total span { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }

.checkline { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; margin-bottom: 6px; cursor: pointer; }
.checkline input { margin-top: 3px; flex-shrink: 0; }

/* ================= 抽屉 ================= */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(16,32,56,.42);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 100;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 620px; max-width: 94vw;
  background: var(--bg); z-index: 101; transform: translateX(100%);
  transition: transform .26s cubic-bezier(.32,.72,.35,1);
  display: flex; flex-direction: column; box-shadow: -8px 0 40px rgba(16,32,56,.18);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  background: var(--primary); color: #fff; padding: 15px 20px;
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.drawer-head h3 { font-size: 15px; font-weight: 700; }
.drawer-head .dh-sub { font-size: 12px; opacity: .68; margin-top: 1px; }
.drawer-head .close {
  margin-left: auto; background: rgba(255,255,255,.14); border: none; color: #fff;
  width: 29px; height: 29px; border-radius: 7px; cursor: pointer; font-size: 16px;
}
.drawer-head .close:hover { background: rgba(255,255,255,.26); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-foot {
  padding: 13px 20px; background: #fff; border-top: 1px solid var(--border);
  display: flex; gap: 9px; flex-shrink: 0;
}

/* ================= 信息网格 ================= */
.info-grid {
  display: grid; grid-template-columns: 88px 1fr; gap: 9px 14px;
  font-size: 13px; margin-bottom: 4px;
}
.info-grid dt { color: var(--muted); font-size: 12.5px; }
.info-grid dd { color: var(--text); }

/* ================= 审批流程条 ================= */
.flow { display: flex; align-items: center; margin: 4px 0 16px; }
.flow-step { flex: 1; text-align: center; position: relative; }
.flow-step .fs-dot {
  width: 25px; height: 25px; border-radius: 50%; margin: 0 auto 5px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: #e8edf3; color: #94a3b8; border: 2px solid transparent;
  transition: all .2s;
}
.flow-step .fs-label { font-size: 11px; color: var(--muted); }
.flow-step::before {
  content: ''; position: absolute; top: 12px; left: 0; right: 50%;
  height: 2px; background: #e8edf3; z-index: 0;
}
.flow-step:first-child::before { display: none; }
.flow-step::after {
  content: ''; position: absolute; top: 12px; left: 50%; right: 0;
  height: 2px; background: #e8edf3; z-index: 0;
}
.flow-step:last-child::after { display: none; }
.flow-step.done .fs-dot { background: var(--ok); color: #fff; }
.flow-step.done::before, .flow-step.done::after { background: var(--ok); }
.flow-step.current .fs-dot {
  background: #fff; color: var(--primary); border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31,78,121,.15);
}
.flow-step.current .fs-label { color: var(--primary); font-weight: 700; }
.flow-step.reject .fs-dot { background: var(--danger); color: #fff; }
.flow-step.reject .fs-label { color: var(--danger); font-weight: 700; }
.flow-step.appeal .fs-dot { background: #4338ca; color: #fff; }

/* ================= 时间轴 ================= */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 15px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -20px; top: 4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary-light);
}
.tl-item.a-approve::before { border-color: var(--ok); background: var(--ok); }
.tl-item.a-reject::before  { border-color: var(--danger); background: var(--danger); }
.tl-item.a-appeal::before  { border-color: #4338ca; background: #4338ca; }
.tl-item.a-recheck::before { border-color: #0891b2; background: #0891b2; }
.tl-item.a-adjust::before  { border-color: var(--warn); background: var(--warn); }
.tl-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.tl-time { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-left: auto; }
.tl-body { font-size: 12.5px; color: #475569; margin-top: 2px; }
.tl-pts { font-size: 12px; margin-top: 3px; }
.tl-pts b { color: var(--ok); }

/* ================= 提示条 ================= */
.alert {
  padding: 10px 14px; border-radius: 8px; font-size: 12.5px;
  margin-bottom: 13px; border-left: 3px solid;
}
.alert-info { background: var(--primary-soft); border-color: var(--primary-light); }
.alert-warn { background: var(--warn-soft); border-color: var(--warn); }
.alert-err  { background: var(--danger-soft); border-color: var(--danger); }
.alert-ok   { background: var(--ok-soft); border-color: var(--ok); }

/* ================= 榜单 ================= */
.rank-badge {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: #eef2f7; color: #64748b;
}
.rank-badge.r1 { background: linear-gradient(135deg,#fbbf24,#f59e0b); color: #fff; }
.rank-badge.r2 { background: linear-gradient(135deg,#cbd5e1,#94a3b8); color: #fff; }
.rank-badge.r3 { background: linear-gradient(135deg,#fdba74,#f97316); color: #fff; }

.bar-wrap { display: flex; height: 6px; border-radius: 4px; overflow: hidden; background: #eef2f7; min-width: 96px; }
.bar-seg { height: 100%; }

/* ================= 其他 ================= */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .e-ico { font-size: 34px; opacity: .32; margin-bottom: 9px; }
.empty p { font-size: 13px; }

.toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar select, .toolbar input { width: auto; min-width: 128px; }

.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tab {
  padding: 8px 15px; cursor: pointer; font-size: 13px; color: var(--muted);
  border: none; background: none; font-family: inherit; border-bottom: 2px solid transparent;
  margin-bottom: -1px; display: flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }
.tab .tb-count {
  background: #eef2f7; color: #64748b; font-size: 11px; padding: 0 6px;
  border-radius: 9px; font-weight: 600;
}
.tab.active .tb-count { background: var(--primary); color: #fff; }

.toast-wrap { position: fixed; top: 74px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: #fff; border-radius: 9px; padding: 12px 17px; font-size: 13px;
  box-shadow: 0 8px 30px rgba(16,32,56,.19); border-left: 3px solid var(--primary);
  min-width: 260px; max-width: 400px; animation: slideIn .24s ease;
}
.toast.ok  { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.warn{ border-left-color: var(--warn); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }

.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; }
.dim { color: var(--muted); font-size: 12px; }
.flex { display: flex; align-items: center; gap: 9px; }
.ml-auto { margin-left: auto; }
.hidden { display: none !important; }

/* ============================================================
   登录页
   ============================================================ */
.login-page { min-height: 100vh; position: relative; display: grid; place-items: center; }
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(255,255,255,.14), transparent 60%),
    radial-gradient(900px 480px at 88% 108%, rgba(0,0,0,.22), transparent 62%),
    linear-gradient(140deg, #1F4E79 0%, #16375a 52%, #0f2740 100%);
}
.login-wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 940px; padding: 34px 20px;
  display: grid; grid-template-columns: 1fr 380px; gap: 46px; align-items: center;
}
.login-brand { color: #fff; }
.login-logo {
  width: 56px; height: 56px; border-radius: 15px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.24);
  display: grid; place-items: center; font-size: 26px; margin-bottom: 20px;
}
.login-brand h1 { font-size: 31px; font-weight: 800; letter-spacing: .5px; line-height: 1.28; margin-bottom: 10px; }
.login-brand p { font-size: 15px; opacity: .74; letter-spacing: 3px; }

.login-card {
  background: #fff; border-radius: 15px; padding: 30px 28px;
  box-shadow: 0 22px 60px rgba(6, 20, 38, .34);
}
.login-card h2 { font-size: 19px; color: var(--primary); margin-bottom: 5px; }
.login-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 20px; line-height: 1.55; }
.login-err {
  background: var(--danger-soft); color: var(--danger);
  padding: 9px 12px; border-radius: 7px; font-size: 12.5px; margin-bottom: 13px;
}
.btn-block { width: 100%; justify-content: center; padding: 11px; font-size: 14.5px; }

.login-demo { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border); }
.ld-title { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; letter-spacing: .4px; }
.ld-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ld-item {
  text-align: left; background: #f8fafc; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 11px; cursor: pointer; font-family: inherit;
  transition: all .14s; display: block;
}
.ld-item:hover { border-color: var(--primary-light); background: var(--primary-soft); transform: translateY(-1px); }
.ld-item b { display: block; font-size: 12.5px; color: var(--primary); }
.ld-item span { font-size: 11px; color: var(--muted); }

/* ============================================================
   通用弹窗
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16,32,56,.46);
  display: grid; place-items: center; z-index: 150; padding: 20px;
}
.modal {
  background: #fff; border-radius: 13px; width: 100%; max-width: 560px;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 22px 60px rgba(16,32,56,.28);
  animation: popIn .2s ease;
}
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 15.5px; color: var(--primary); font-weight: 700; }
.modal-head .close {
  margin-left: auto; background: none; border: none; font-size: 17px;
  cursor: pointer; color: var(--muted); width: 28px; height: 28px; border-radius: 6px;
}
.modal-head .close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot {
  padding: 13px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 9px; justify-content: flex-end; background: #fafbfc;
  border-radius: 0 0 13px 13px;
}

/* ============================================================
   角色徽标 / 首页头部
   ============================================================ */
.role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.rb-admin      { background: #fee2e2; color: #b91c1c; }
.rb-admission  { background: #ffedd5; color: #c2410c; }
.rb-brand      { background: #ede9fe; color: #6d28d9; }
.rb-principal  { background: #cffafe; color: #0e7490; }
.rb-teacher    { background: #dbeafe; color: #1d4ed8; }

.hero {
  background: linear-gradient(135deg, var(--primary), #16375a);
  color: #fff; border-radius: var(--radius); padding: 20px 24px;
  margin-bottom: 16px; display: flex; align-items: center; gap: 18px;
  box-shadow: 0 6px 20px rgba(31,78,121,.2);
}
.hero .h-avatar {
  width: 50px; height: 50px; border-radius: 13px; flex-shrink: 0;
  background: rgba(255,255,255,.18); display: grid; place-items: center;
  font-size: 21px; font-weight: 700;
}
.hero h1 { font-size: 19px; font-weight: 700; margin-bottom: 3px; }
.hero p { font-size: 12.5px; opacity: .8; }
.hero .h-stats { margin-left: auto; display: flex; gap: 26px; }
.hero .h-stat { text-align: right; }
.hero .h-stat b { display: block; font-size: 23px; line-height: 1.15; }
.hero .h-stat span { font-size: 11.5px; opacity: .78; }

/* ============================================================
   活动卡片
   ============================================================ */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 13px; }
.event-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 15px 16px; transition: all .15s; position: relative;
}
.event-card:hover { box-shadow: var(--shadow); border-color: #c3d3e4; }
.event-card.closed { opacity: .58; background: #fafbfc; }
.event-card .ev-top { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 9px; }
.event-card .ev-icon { font-size: 21px; }
.event-card .ev-name { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.4; }
.event-card .ev-meta { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.7; }
.event-card .ev-foot {
  display: flex; align-items: center; gap: 8px; margin-top: 11px;
  padding-top: 10px; border-top: 1px solid #f1f5f9; font-size: 11.5px; color: var(--muted);
}
.ev-kind {
  font-size: 11px; padding: 2px 8px; border-radius: 5px; font-weight: 600;
  background: var(--primary-soft); color: var(--primary);
}
.ev-kind.k-promotion_campaign { background: #ede9fe; color: #6d28d9; }
.ev-kind.k-extra_point { background: #fef3c7; color: #b45309; }

/* 类型选择块（申报时选活动） */
.event-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.event-opt {
  border: 1.5px solid var(--border); border-radius: 9px; padding: 12px 14px;
  cursor: pointer; transition: all .14s; position: relative;
}
.event-opt:hover { border-color: var(--primary-light); background: #fafcfe; }
.event-opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.event-opt .eo-name { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.event-opt .eo-meta { font-size: 11.5px; color: var(--muted); }

/* ============================================================
   规则选择（申报）
   ============================================================ */
.rule-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rule-group { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.rule-group .rg-head { padding: 8px 12px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.rg-wom  .rg-head { background: var(--wom-soft);  color: var(--wom); }
.rg-act  .rg-head { background: var(--act-soft);  color: #0369a1; }
.rg-conv .rg-head { background: var(--conv-soft); color: #c2410c; }
.rule-opt {
  padding: 9px 12px; cursor: pointer; font-size: 12.5px;
  border-top: 1px solid #f1f5f9; display: flex; align-items: center; gap: 8px;
}
.rule-opt:hover { background: #f8fafc; }
.rule-opt.sel { background: var(--primary-soft); font-weight: 600; }
.rule-opt .r-score { margin-left: auto; font-weight: 700; color: var(--primary); font-size: 12px; white-space: nowrap; }

.score-preview {
  background: linear-gradient(135deg, #f8fbff, #eef4fb);
  border: 1px solid #d6e4f2; border-radius: 9px; padding: 13px 16px;
  display: flex; align-items: center; gap: 16px; margin-bottom: 15px; flex-wrap: wrap;
}
.score-preview .sp-formula { font-size: 13px; color: #475569; }
.score-preview .sp-route { font-size: 12px; color: var(--muted); }
.score-preview .sp-total { margin-left: auto; font-size: 27px; font-weight: 800; color: var(--primary); }
.score-preview .sp-total span { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }

/* ============================================================
   账号管理
   ============================================================ */
.role-pill {
  display: inline-block; padding: 2px 9px; border-radius: 5px;
  font-size: 11.5px; font-weight: 600;
}
.rp-admin { background: #fee2e2; color: #b91c1c; }
.rp-admission_director { background: #ffedd5; color: #c2410c; }
.rp-brand_director { background: #ede9fe; color: #6d28d9; }
.rp-principal { background: #cffafe; color: #0e7490; }
.rp-teacher { background: #dbeafe; color: #1d4ed8; }

.st-on  { color: var(--ok); font-weight: 600; }
.st-off { color: var(--muted); }

.row-actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* 备份 / 操作日志 */
.file-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  background: var(--bg); padding: 3px 9px; border-radius: 5px; border: 1px solid var(--border);
}
.undo-hint { font-size: 11.5px; color: var(--muted); }

/* 审批条线 */
.line-card {
  background: #fff; border-radius: 10px; padding: 16px 18px;
  border-left: 4px solid var(--primary); box-shadow: var(--shadow); margin-bottom: 11px;
  display: flex; align-items: center; gap: 18px;
}
.line-card .lc-name { font-size: 15px; font-weight: 700; }
.line-card .lc-metrics { margin-left: auto; display: flex; gap: 24px; text-align: center; }
.line-card .lc-m b { display: block; font-size: 20px; line-height: 1.2; }
.line-card .lc-m span { font-size: 11.5px; color: var(--muted); }

@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; max-width: 420px; gap: 26px; }
  .login-brand { text-align: center; }
  .login-logo { margin: 0 auto 16px; }
  .rule-picker { grid-template-columns: 1fr; }
  .hero { flex-wrap: wrap; }
  .hero .h-stats { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* ============================================================
   两本账 + 五级审批链
   ============================================================ */
.track-tabs { display: flex; gap: 0; margin-bottom: 16px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.track-tab {
  flex: 1; padding: 14px 18px; cursor: pointer; border: none; background: #fff;
  font-family: inherit; text-align: left; transition: all .16s; position: relative;
}
.track-tab:hover { background: #f8fafc; }
.track-tab.on { color: #fff; }
.track-tab.on.t-promo  { background: linear-gradient(135deg, #1F4E79, #16375a); }
.track-tab.on.t-source { background: linear-gradient(135deg, #b91c1c, #7f1d1d); }
.track-tab .tt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.track-tab .tt-name { font-size: 15px; font-weight: 700; }
.track-tab .tt-desc { font-size: 11.5px; opacity: .72; line-height: 1.5; }
.track-tab:not(.on) .tt-desc { color: var(--muted); opacity: 1; }
.track-tab:not(.on) .tt-name { color: var(--text); }

/* 双账汇总卡 */
.dual-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.dual-card { border-radius: var(--radius); padding: 18px 20px; color: #fff; box-shadow: var(--shadow); }
.dual-card.c-promo  { background: linear-gradient(135deg, #1F4E79, #2b6cb0); }
.dual-card.c-source { background: linear-gradient(135deg, #b91c1c, #dc2626); }
.dual-card .dc-label { font-size: 13px; opacity: .88; display: flex; align-items: center; gap: 7px; }
.dual-card .dc-value { font-size: 34px; font-weight: 800; line-height: 1.15; margin: 4px 0 2px; }
.dual-card .dc-value span { font-size: 14px; font-weight: 500; opacity: .8; margin-left: 4px; }
.dual-card .dc-desc { font-size: 11.5px; opacity: .8; line-height: 1.55; }
.dual-card .dc-breakdown { display: flex; gap: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.2); }
.dual-card .dc-b { font-size: 11.5px; opacity: .85; }
.dual-card .dc-b b { display: block; font-size: 16px; font-weight: 700; }

/* 五级审批链 */
.chain { margin: 14px 0; padding: 16px 14px; background: #f8fafc; border-radius: 10px; border: 1px solid var(--border); }
.chain-title { font-size: 12px; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.chain-flow { display: flex; align-items: flex-start; }
.chain-node { flex: 1; text-align: center; position: relative; }
.chain-node::before {
  content: ''; position: absolute; top: 15px; left: 0; right: 50%;
  height: 3px; background: #dde5ee; z-index: 0;
}
.chain-node::after {
  content: ''; position: absolute; top: 15px; left: 50%; right: 0;
  height: 3px; background: #dde5ee; z-index: 0;
}
.chain-node:first-child::before, .chain-node:last-child::after { display: none; }
.chain-node.passed::before, .chain-node.passed::after { background: var(--ok); }
.cn-dot {
  width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 8px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: #fff; border: 2px solid #dde5ee; color: #94a3b8;
  position: relative; z-index: 1; transition: all .2s;
}
.chain-node.passed .cn-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.chain-node.current .cn-dot {
  border-color: var(--primary); color: var(--primary);
  box-shadow: 0 0 0 5px rgba(31,78,121,.14);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 5px rgba(31,78,121,.14); }
  50%     { box-shadow: 0 0 0 9px rgba(31,78,121,.07); }
}
.chain-node .cn-label { font-size: 12px; font-weight: 600; color: #64748b; }
.chain-node.passed .cn-label { color: var(--ok); }
.chain-node.current .cn-label { color: var(--primary); font-weight: 700; }
.chain-node .cn-who { font-size: 11px; color: var(--muted); margin-top: 2px; }
.chain-cc {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border);
  font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px;
}

/* 学年卡片 */
.year-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 15px 17px;
  margin-bottom: 11px; background: #fff; display: flex; align-items: center; gap: 18px;
}
.year-card.active { border-color: var(--primary); background: var(--primary-soft); }
.year-card .yc-year { font-size: 16px; font-weight: 700; color: var(--primary); min-width: 108px; }
.year-card .yc-metrics { display: flex; gap: 22px; margin-left: auto; text-align: center; }
.year-card .yc-m b { display: block; font-size: 18px; line-height: 1.25; }
.year-card .yc-m span { font-size: 11px; color: var(--muted); }
.year-card .yc-actions { display: flex; gap: 7px; }

/* 生源贡献信息条 */
.source-banner {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fecaca; border-radius: 9px; padding: 13px 16px; margin-bottom: 15px;
}
.source-banner .sb-title { font-size: 13.5px; font-weight: 700; color: #b91c1c; margin-bottom: 4px; }
.source-banner .sb-flow { font-size: 12px; color: #7f1d1d; line-height: 1.7; }

/* ============================================================
   证明材料照片上传
   ============================================================ */
.uploader {
  border: 1.5px dashed var(--border); border-radius: 10px;
  padding: 14px; background: #fcfdfe; transition: all .16s;
}
.uploader.drag { border-color: var(--primary); background: var(--primary-soft); }
.uploader-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.uploader-hint { font-size: 11.5px; color: var(--muted); }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb {
  position: relative; width: 88px; height: 88px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--border); background: #fff;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .th-size {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.55); color: #fff; font-size: 10px;
  text-align: center; padding: 1px 0;
}
.thumb .th-del {
  position: absolute; top: 2px; right: 2px; width: 19px; height: 19px;
  border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none;
  cursor: pointer; font-size: 12px; line-height: 1; display: grid; place-items: center;
}
.thumb .th-del:hover { background: var(--danger); }
.thumb.uploading { display: grid; place-items: center; color: var(--muted); font-size: 11px; }

.link-divider { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; }
.link-divider::before, .link-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.link-divider span { font-size: 11px; color: var(--muted); }

/* 申报详情里的附件 */
.attach-grid { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 8px; }
.attach-item {
  width: 84px; height: 84px; border-radius: 7px; overflow: hidden;
  border: 1px solid var(--border); position: relative; background: #fff;
}
.attach-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.attach-item .ai-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.55); color: #fff; font-size: 9.5px;
  padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 图片查看 */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.86); z-index: 300;
  display: grid; place-items: center; cursor: zoom-out; padding: 30px;
}
.lightbox img { max-width: 92%; max-height: 88%; border-radius: 8px; }
.lightbox .lb-cap { color: #fff; font-size: 12.5px; margin-top: 12px; text-align: center; }
