/* ============================================================
   二级教学单位年度绩效考核管理平台 · 蓝色精简设计系统
   铁律（建站经验贴 §四）：最小字号 18px；中文楷体+数字英文无衬线；
   等宽数字；灰字够深；按钮 nowrap 等高；弹窗不进动画容器。
   ============================================================ */
:root {
  --blue: #123c69;
  --blue-l: #2a5d94;
  --blue-xl: #dfe9f5;
  --bg: #eaf1fa;
  --panel: #ffffff;
  --line: #d3dfee;
  --txt: #1c2f4a;
  --txt-dim: #52627c;
  --green: #1f7a5c;
  --red: #b3261e;
  --gold: #8a6d1a;
}

html { font-size: 18px; }
body {
  min-height: 100vh;
  background: linear-gradient(160deg, #e8f0fa 0%, var(--bg) 45%, #dde8f4 100%);
  background-attachment: fixed;
  color: var(--txt);
  /* 中文楷体、数字英文无衬线：拉丁字体在前，汉字逐字回退到楷体族 */
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Kaiti SC", "STKaiti", KaiTi,
    "AR PL UKai CN", "AR PL UKai TW", "楷体", "PingFang SC", "Microsoft YaHei", sans-serif;
}
/* 小号文本不小于 1rem（手册：最小字号 18px，例外需登记） */
.small, .form-text, .badge, .btn-sm, .btn-group-sm > .btn, .input-group-text { font-size: 1rem !important; }
.table thead th { font-size: 1rem; }

/* 数字、账号、日期等宽 */
.num, td.num, th.num, .font-num {
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

a { color: var(--blue-l); }
a:hover { color: var(--blue); }
.text-muted { color: var(--txt-dim) !important; }

/* ---------- 顶栏 ---------- */
.app-navbar {
  position: sticky; top: 0; z-index: 1030;
  background: var(--blue);
}
.app-navbar .navbar-brand, .app-navbar .nav-link, .app-navbar .dropdown-toggle {
  color: #e8f0fa; font-weight: 600;
}
.app-navbar .nav-link:hover, .app-navbar .dropdown-toggle:hover { color: #ffffff; }
.app-navbar .nav-link.active { color: #ffffff; border-bottom: 3px solid #7fb0e0; }
.portal-chip {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff; border-radius: 999px; padding: .1rem .7rem;
  font-size: .78rem; letter-spacing: .12em;
}
.app-navbar .dropdown-menu { font-size: 1rem; }

/* ---------- 卡片与页标题 ---------- */
.card { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.card-header { background: #f2f7fd; border-bottom: 1px solid var(--line); font-weight: 700; }
.page-title {
  font-size: 1.22rem; font-weight: 800; color: var(--blue);
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.page-title::before {
  content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--blue);
  display: inline-block;
}

/* ---------- 按钮：等高、nowrap、透明底边框（防高低不齐） ---------- */
.btn { border-width: 1.5px; white-space: nowrap; }
.btn-primary {
  --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue);
  --bs-btn-hover-bg: var(--blue-l); --bs-btn-hover-border-color: var(--blue-l);
  --bs-btn-active-bg: #0e3053; --bs-btn-active-border-color: #0e3053;
}
.btn-outline-primary { --bs-btn-color: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: var(--blue); --bs-btn-hover-border-color: var(--blue); }

/* ---------- 表格 ---------- */
.table { background: #fff; }
.table thead th {
  background: var(--blue-xl); color: var(--blue); white-space: nowrap;
  vertical-align: middle; border-bottom: 2px solid #c3d5ea;
}
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: #f4f8fd; }

/* 状态徽章配色（文字要深，可读第一） */
.st-done   { background: #e2f3ec; color: #14523c; }
.st-wait   { background: #fdf3d7; color: #6b5310; }
.st-back   { background: #fbe5e3; color: #8f1f18; }
.st-lock   { background: #e5e9f2; color: #3a4763; }
.st-draft  { background: #e8eef7; color: #3a4763; }

/* 一级指标标签（1蓝/2绿/3橙/4紫/5红，浅底彩边） */
.lv1-tag { display: inline-block; border-radius: 999px; padding: .05rem .6rem; border: 1.5px solid; font-size: .9rem; white-space: nowrap; }
.lv1-1 { background: #e6f1fb; border-color: #85b7eb; }
.lv1-2 { background: #eaf3de; border-color: #97c459; }
.lv1-3 { background: #faeeda; border-color: #ef9f27; }
.lv1-4 { background: #eeedfe; border-color: #afa9ec; }
.lv1-5 { background: #fcebeb; border-color: #f09595; }

/* ---------- 门户入口卡 ---------- */
.portal-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 1.2rem 1.4rem; height: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
}
.portal-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(18, 60, 105, .16); color: inherit; }
.portal-card .bi { font-size: 1.8rem; color: var(--blue); }

/* ---------- 登录页 ---------- */
.login-wrap { max-width: 430px; margin: 4rem auto; }
.login-brand { color: var(--blue); font-weight: 800; letter-spacing: .04em; }

/* ---------- 佐证材料 chip ---------- */
.att-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  background: #eef4fb; border: 1px solid #c8d9ec; border-radius: 6px;
  padding: .12rem .5rem; margin: .12rem .3rem .12rem 0; font-size: .92rem;
}
.att-chip a { text-decoration: none; }

/* ---------- 算式/口径说明框 ---------- */
.formula-box {
  background: #f6f9fd; border: 1px dashed #b9cade; border-radius: 8px;
  padding: .6rem .8rem; font-size: .95rem;
}

/* 弹窗兜底（手册：已打开的弹窗必须可见） */
.modal.show { opacity: 1 !important; }

/* ---------- 打印 ---------- */
@media print {
  .app-navbar, .no-print, .btn, form button { display: none !important; }
  body { background: #fff; }
  .card { border: none; }
}

/* ============================================================
   门户首页 · 深色科技风（模仿 kechuang 设计语言）
   仅用于门户 home 与登录页；业务内页保持浅色精简风格。
   ============================================================ */
.portal-dark {
  min-height: 100vh;
  color: #dbe7f8;
  background:
    radial-gradient(1100px 620px at 82% -10%, rgba(47, 124, 246, .22), transparent 60%),
    radial-gradient(900px 560px at -6% 108%, rgba(34, 211, 238, .12), transparent 55%),
    linear-gradient(160deg, #060d1f 0%, #0a1628 46%, #0f1f3d 100%);
  background-attachment: fixed;
  font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}
/* 网格底纹 + 顶部渐隐遮罩 */
.portal-dark::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(94, 160, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 160, 255, .05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}
/* 漂浮光点 */
.portal-dark .star {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(34, 211, 238, .9), rgba(34, 211, 238, 0) 70%);
  animation: starFloat 9s ease-in-out infinite alternate;
}
@keyframes starFloat {
  from { transform: translateY(0) scale(1); opacity: .35; }
  to   { transform: translateY(-46px) scale(1.25); opacity: .85; }
}
/* 顶栏（深色毛玻璃） */
.portal-dark .app-navbar {
  background: rgba(10, 22, 40, .72);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(94, 160, 255, .18);
}
/* Hero */
.hero-title {
  font-weight: 800; letter-spacing: .04em; line-height: 1.25;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem); color: #f2f7ff;
}
.hero-title .grad {
  background: linear-gradient(92deg, #22d3ee 10%, #5ea0ff 55%, #7c5cff 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, .35));
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid rgba(34, 211, 238, .35); border-radius: 999px;
  color: #8fe6f5; padding: .2rem .9rem; letter-spacing: .18em; font-size: .82rem;
  background: rgba(34, 211, 238, .07);
}
/* 统计条 */
.stat-strip {
  display: flex; flex-wrap: wrap; gap: 0; justify-content: center;
  border: 1px solid rgba(94, 160, 255, .22); border-radius: 14px;
  background: rgba(15, 31, 61, .55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.stat-strip .stat {
  flex: 1 1 150px; text-align: center; padding: 1rem .6rem; position: relative;
}
.stat-strip .stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 22%; height: 56%; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(94, 160, 255, .45), transparent);
}
.stat-strip .stat b {
  display: block; font-size: 1.9rem; font-weight: 800; color: #22d3ee;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(34, 211, 238, .45);
}
.stat-strip .stat span { color: #8aa3c7; }
/* 入口卡片（每卡一色光晕，hover 抬升增强） */
.gate-card {
  position: relative; display: block; text-decoration: none; color: #dbe7f8;
  border-radius: 16px; padding: 1.5rem 1.4rem; height: 100%; overflow: hidden;
  background: linear-gradient(180deg, rgba(22, 48, 94, .55), rgba(10, 22, 40, .75));
  border: 1px solid rgba(94, 160, 255, .22);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.gate-card::before {
  content: ""; position: absolute; top: -70px; left: 50%; transform: translateX(-50%);
  width: 78%; height: 130px; border-radius: 50%; filter: blur(46px); opacity: .5;
  background: radial-gradient(circle, var(--glow, #22d3ee), transparent 70%);
  transition: opacity .25s ease, top .25s ease;
}
.gate-card:hover {
  transform: translateY(-6px); color: #fff;
  border-color: rgba(34, 211, 238, .55);
  box-shadow: 0 18px 44px rgba(6, 13, 31, .6), 0 0 0 1px rgba(34, 211, 238, .18) inset;
}
.gate-card:hover::before { opacity: .95; top: -58px; }
.gate-card .gate-ico {
  width: 56px; height: 56px; border-radius: 14px; position: relative;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #fff;
  background: linear-gradient(135deg, var(--glow-a, #22d3ee), var(--glow-b, #2f7cf6));
  box-shadow: 0 8px 20px rgba(34, 211, 238, .35);
  transition: transform .25s ease;
}
.gate-card:hover .gate-ico { transform: scale(1.08) rotate(-3deg); }
.gate-card h5 { color: #f2f7ff; font-weight: 700; }
.gate-card p { color: #8aa3c7; margin: 0; }
.gate-card .gate-arrow {
  position: absolute; right: 1.2rem; bottom: 1.1rem; color: var(--glow, #22d3ee);
  opacity: .55; transition: transform .22s ease, opacity .22s ease;
}
.gate-card:hover .gate-arrow { transform: translateX(6px); opacity: 1; }
/* 流程条 */
.flow-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .6rem; }
.flow-node {
  padding: .35rem 1.1rem; border-radius: 999px; white-space: nowrap;
  border: 1px solid rgba(94, 160, 255, .3); color: #c6d8f2;
  background: rgba(15, 31, 61, .5); font-size: .95rem;
}
.flow-sep { color: #22d3ee; opacity: .8; animation: flowDash 1.6s ease-in-out infinite; }
@keyframes flowDash { 0%,100% { transform: translateX(0); opacity: .35; } 50% { transform: translateX(5px); opacity: 1; } }
/* 深色公告卡 */
.dark-panel {
  border: 1px solid rgba(94, 160, 255, .2); border-radius: 14px;
  background: rgba(10, 22, 40, .6);
}
.dark-panel .list-group-item {
  background: transparent; border-color: rgba(94, 160, 255, .12); color: #c6d8f2;
}
.dark-panel a { color: #9fd4f0; text-decoration: none; }
.dark-panel a:hover { color: #22d3ee; }
/* 登录页（同款深色） */
.login-dark-card {
  background: rgba(13, 27, 53, .78);
  border: 1px solid rgba(94, 160, 255, .25); border-radius: 16px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(4, 9, 22, .55);
}
.login-dark-card .form-control, .login-dark-card .form-label { color: #dbe7f8; }
.login-dark-card .form-control {
  background: rgba(10, 22, 40, .8); border-color: rgba(94, 160, 255, .3);
}
.login-dark-card .form-control:focus {
  background: rgba(10, 22, 40, .9); color: #fff;
  border-color: #22d3ee; box-shadow: 0 0 0 .2rem rgba(34, 211, 238, .18);
}
.login-dark-card .btn-primary {
  --bs-btn-bg: linear-gradient(92deg, #22d3ee, #2f7cf6); border: none;
  background: linear-gradient(92deg, #22d3ee, #2f7cf6);
  box-shadow: 0 10px 26px rgba(34, 211, 238, .3);
}
/* 动效兜底：减少动态环境停用动画 */
@media (prefers-reduced-motion: reduce) {
  .portal-dark .star, .flow-sep, .gate-card, .gate-card .gate-ico { animation: none !important; transition: none !important; }
}
