/* ===== 采购管理工作台 - 商务风格样式 ===== */
:root {
  --primary: #1f4e93;
  --primary-2: #2a6fd6;
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e4e8f0;
  --txt: #2b3445;
  --txt2: #7a8499;
  --ok: #2a7a57;
  --warn: #b07418;
  --danger: #c0392b;
  --info: #2a6fd6;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(31, 78, 147, .07), 0 4px 16px rgba(31, 78, 147, .05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--txt); font-size: 14px;
}
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 布局骨架 ===== */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px; flex: none; background: linear-gradient(180deg, #16345f 0%, #1f4e93 100%);
  color: #d7e2f2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-badge {
  width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, #3d7bd9, #6db1ff);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; flex: none;
}
.brand-badge.big { width: 52px; height: 52px; font-size: 26px; }
.brand-logo { height: 38px; max-width: 150px; object-fit: contain; }
.brand-txt b { display: block; color: #fff; font-size: 15px; letter-spacing: .5px; }
.brand-txt small { color: #9db6da; font-size: 11px; }
.menu { flex: 1; overflow-y: auto; padding: 10px 8px; }
.menu a {
  display: flex; align-items: center; gap: 9px; color: #c4d4ec; padding: 9px 12px;
  border-radius: 8px; margin-bottom: 2px; font-size: 13.5px; transition: .15s;
}
.menu a:hover { background: rgba(255,255,255,.09); color: #fff; text-decoration: none; }
.menu a.on { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.menu .dot { width: 5px; height: 5px; border-radius: 50%; background: #6ea3e8; flex: none; }
.menu a.on .dot { background: #ffd76a; }
.side-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.12); }
.side-foot a { display: block; color: #c4d4ec; padding: 6px 0; font-size: 13px; }
.side-foot .admin-link { color: #ffd76a; font-weight: 600; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--line); padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 17px; color: var(--primary); }
.top-right { display: flex; align-items: center; gap: 12px; }
.who { color: var(--txt2); font-size: 13px; }
.clock {
  font-family: Consolas, monospace; font-size: 12.5px; color: var(--primary);
  background: #eef3fb; border: 1px solid #dbe4f2; border-radius: 20px; padding: 4px 12px; white-space: nowrap;
}
.content { padding: 20px 24px; flex: 1; }
.foot { padding: 14px 24px; color: var(--txt2); font-size: 12px; text-align: center; }

/* ===== 工具栏 / 页签 ===== */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.tb-left, .tb-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sec-title { font-size: 16px; color: var(--primary); }
.search { display: flex; gap: 6px; }
.search input {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; width: 200px; outline: none; font-size: 13px;
}
.search input:focus { border-color: var(--primary-2); }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 2px solid var(--line); }
.tab {
  padding: 8px 18px; color: var(--txt2); border-radius: 8px 8px 0 0; font-size: 13.5px; margin-bottom: -2px;
  border-bottom: 2px solid transparent;
}
.tab:hover { text-decoration: none; color: var(--primary); }
.tab.on { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); background: #eef3fb; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--line); background: var(--card); color: var(--txt);
  padding: 8px 15px; border-radius: 8px; font-size: 13.5px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary-2); color: var(--primary-2); text-decoration: none; box-shadow: var(--shadow); }
.btn-primary { background: linear-gradient(135deg, #1f4e93, #2a6fd6); border-color: transparent; color: #fff; font-weight: 600; }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-block { width: 100%; margin-top: 6px; padding: 11px; font-size: 15px; }
.linkbtn { background: none; border: none; color: var(--primary-2); cursor: pointer; font-size: 12.5px; padding: 2px 4px; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger { color: var(--danger); }

/* ===== 卡片 / 表格 ===== */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
.card.pad { padding: 18px 20px; overflow: visible; }
.panel-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .panel-grid { grid-template-columns: 1fr; } }
.panel-title { font-size: 14.5px; color: var(--primary); margin-bottom: 12px; }
table.grid { width: 100%; border-collapse: collapse; min-width: 640px; }
table.grid th {
  background: #f0f4fa; color: #44506a; font-size: 12.5px; text-align: left; padding: 10px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0;
}
table.grid td { padding: 9px 10px; border-bottom: 1px solid #eef1f6; font-size: 13px; vertical-align: middle; }
table.grid tr:hover td { background: #f8fafd; }
td.ta-r, th.ta-r { text-align: right; }
td.ta-c, th.ta-c { text-align: center; }
.empty { text-align: center; color: var(--txt2); padding: 34px 0 !important; }
.dim { color: var(--txt2); }
.mono { font-family: Consolas, monospace; font-size: 12.5px; }
.num { font-family: Consolas, monospace; }
.hint { color: var(--txt2); font-size: 12.5px; margin-top: 10px; line-height: 1.8; }

/* ===== 徽章 ===== */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; font-weight: 600;
}
.b-ok     { background: #e3f4ea; color: var(--ok); }
.b-info   { background: #e7effc; color: var(--info); }
.b-warn   { background: #fdf3e0; color: var(--warn); }
.b-danger { background: #fdeae7; color: var(--danger); }
.b-muted  { background: #eef0f4; color: #8b94a7; }

/* ===== 交期颜色提醒: 5/7/10/15 天 ===== */
td.r5, .lg.r5          { background: #fdecea !important; color: #c0392b; font-weight: 700; }
td.r7, .lg.r7          { background: #fdeedd !important; color: #d35400; font-weight: 700; }
td.r10, .lg.r10        { background: #fdf6dc !important; color: #b7950b; font-weight: 700; }
td.r15, .lg.r15        { background: #e7effc !important; color: #2a6fd6; font-weight: 700; }
td.r-overdue, .lg.r-overdue { background: #c0392b !important; color: #fff !important; font-weight: 700; }
.lg { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.th-reminder { color: var(--danger); }

/* ===== 统计卡片 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.stat-num { font-size: 24px; font-weight: 700; color: var(--primary); font-family: Consolas, "Microsoft YaHei", monospace; }
.stat-num.ok { color: var(--ok); } .stat-num.warn { color: var(--warn); }
.stat-num.danger { color: var(--danger); } .stat-num.info { color: var(--info); }
.stat-label { color: var(--txt2); font-size: 12.5px; margin-top: 4px; }

/* ===== 趋势图 ===== */
.trend { display: flex; flex-direction: column; gap: 10px; }
.trend-row { display: flex; align-items: center; gap: 10px; }
.trend-day { width: 46px; color: var(--txt2); font-size: 12px; }
.trend-bars { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.trend-bar { display: flex; align-items: center; gap: 8px; }
.trend-bar .bar { display: block; height: 9px; border-radius: 5px; min-width: 2px; }
.bar-o { background: linear-gradient(90deg, #2a6fd6, #6db1ff); }
.bar-a { background: linear-gradient(90deg, #2a7a57, #63c391); }
.trend-bar em { font-style: normal; font-size: 11.5px; color: var(--txt2); width: 22px; text-align: right; font-family: Consolas, monospace; }
.trend-bar u { text-decoration: none; font-size: 11px; color: #aab3c5; width: 28px; }

/* ===== 提示条 ===== */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13.5px; }
.alert-ok  { background: #e3f4ea; color: var(--ok); border: 1px solid #bfe5cd; }
.alert-err { background: #fdeae7; color: var(--danger); border: 1px solid #f5c6bd; }

/* ===== 表单 / 对话框 ===== */
.fld { display: block; margin-bottom: 13px; }
.fld > span { display: block; font-size: 13px; color: #44506a; margin-bottom: 5px; }
.fld input, .fld select, .fld textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
  font-size: 13.5px; outline: none; background: #fbfcfe; font-family: inherit; transition: .15s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--primary-2); background: #fff; box-shadow: 0 0 0 3px rgba(42, 111, 214, .1); }
.switch-fld select { width: 160px; }
dialog.dlg {
  border: none; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 22px 24px; width: min(520px, 92vw); max-height: 86vh; overflow-y: auto;
}
dialog.dlg::backdrop { background: rgba(15, 30, 60, .45); }
dialog.dlg h3 { color: var(--primary); font-size: 16px; margin-bottom: 16px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ===== 在线编辑单元格 ===== */
td.ed { cursor: pointer; min-width: 70px; background: rgba(42, 111, 214, .04); transition: .12s; }
td.ed:hover { background: rgba(42, 111, 214, .12); box-shadow: inset 0 0 0 1.5px var(--primary-2); border-radius: 4px; }
td.ed .cell-editor {
  width: 100%; min-width: 90px; border: 1.5px solid var(--primary-2); border-radius: 5px;
  padding: 4px 7px; font-size: 13px; outline: none; font-family: inherit; background: #fff;
}

/* ===== 登录页 ===== */
.login-body { min-height: 100vh; }
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #16345f 0%, #1f4e93 55%, #2a6fd6 100%);
  background-size: cover; background-position: center; padding: 30px 16px;
}
.login-card {
  width: 400px; max-width: 100%; background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.35); padding: 34px 34px 22px;
}
.login-head { text-align: center; margin-bottom: 22px; }
.login-head h1 { font-size: 21px; color: var(--primary); margin-top: 10px; letter-spacing: 1px; }
.login-head p { color: var(--txt2); font-size: 12.5px; margin-top: 3px; letter-spacing: 2px; }
.login-logo { height: 52px; max-width: 200px; object-fit: contain; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-img { height: 40px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); flex: none; }
.login-foot { text-align: center; margin-top: 16px; font-size: 13px; color: var(--txt2); }
.login-copy { text-align: center; color: #aab3c5; font-size: 11.5px; margin-top: 16px; }

/* ===== 合同扫描件缩略图 ===== */
.docs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.thumb {
  height: 44px; max-width: 64px; object-fit: cover; border: 1px solid var(--line);
  border-radius: 5px; cursor: zoom-in; background: #fbfcfe; transition: .15s;
}
.thumb:hover { transform: scale(1.06); border-color: var(--primary-2); box-shadow: var(--shadow); }
.doc-pdf {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 5px; background: #fdecea; color: var(--danger); font-size: 11.5px; font-weight: 700;
  border: 1px solid #f5c6bd;
}
.doc-pdf:hover { text-decoration: none; filter: brightness(.95); }
/* CAD / PDF 等不支持缩略图的文件角标 */
.doc-file {
  display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 42px; padding: 0 6px;
  border-radius: 5px; font-size: 11px; font-weight: 700; background: #e7effc; color: var(--info); border: 1px solid #c7d9f5;
}
.doc-file:hover { text-decoration: none; filter: brightness(.95); }
.cad-dwg, .cad-dxf { background: #fdf3e0; color: var(--warn); border-color: #f0dfb8; }
.cad-prt, .cad-sldprt, .cad-asm, .cad-sldasm { background: #eef0f6; color: #55607a; border-color: #d8dde8; }
.cad-stp, .cad-step, .cad-igs, .cad-iges, .cad-stl, .cad-obj { background: #e3f4ea; color: var(--ok); border-color: #bfe5cd; }
.cad-pdf { background: #fdecea; color: var(--danger); border-color: #f5c6bd; }
.doc-del {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 50%; background: #c0392b; color: #fff; font-size: 13px; line-height: 1; margin-left: -8px;
  align-self: flex-start;
}
.doc-del:hover { text-decoration: none; filter: brightness(1.15); }
/* 管理员可见的附件所有者标签 */
.doc-owner {
  display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 10px; font-size: 11px;
  line-height: 16px; color: var(--muted); background: #eef1f6; border: 1px solid var(--line); white-space: nowrap;
}
.inline-form { display: inline; }
/* 重要: 默认必须 display:none。不能用 hidden 属性控制——作者样式 display:flex 会覆盖 [hidden]{display:none},
   导致遮罩层一进页面就全屏显示且无法通过 JS 关闭 */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(10, 22, 45, .88); z-index: 9999;
  align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox.on { display: flex; }
/* 兜底: 不支持 <dialog> 的浏览器不要把新增表单直接渲染在页面上 */
dialog.dlg:not([open]) { display: none; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #fff; }
.lb-close { position: absolute; top: 22px; right: 34px; color: #fff; font-size: 34px; cursor: pointer; line-height: 1; }

/* ===== 顶栏登录 IP 归属地 ===== */
.iploc {
  color: var(--txt2); font-size: 13px; white-space: nowrap; cursor: default;
  padding: 3px 9px; border-radius: 20px; background: #eef3fb; border: 1px solid #dde5f2;
}
.iploc:hover { color: var(--primary-2); border-color: #c7d9f5; }

/* ===== 导入方式选择(仅新增 / 合并去重) ===== */
.import-mode { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 2px; margin: 6px 0 16px; background: #fbfcfe; }
.import-mode legend { font-size: 13px; font-weight: 700; color: #44506a; padding: 0 6px; }
.mode-opt { display: block; position: relative; padding: 10px 12px 10px 34px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.mode-opt input[type=radio] { position: absolute; left: 12px; top: 14px; margin: 0; }
.mo-t { display: block; font-size: 13.5px; color: #44506a; }
.mo-d { display: block; font-size: 12.5px; color: var(--txt2); line-height: 1.75; margin-top: 3px; }
.mode-opt.on { border-color: var(--primary-2); background: #f2f7ff; box-shadow: 0 0 0 3px rgba(42, 111, 214, .08); }
.mode-opt.on .mo-t { color: var(--primary-2); }
.mode-opt.on .mo-t b { color: var(--primary-2); }

/* ===== 版本号 / 邮箱后缀选择 ===== */
/* 后台版本号只在顶栏用户名右侧显示, 侧边栏与页脚不再重复显示 */
.login-ver { text-align: center; margin-top: 10px; font-size: 12px; color: var(--txt2); font-family: Consolas, monospace; }
.email-row { display: flex; align-items: center; gap: 6px; }
.email-row input { flex: 1; min-width: 0; }
.email-row select { width: 150px; flex: none; }
.email-row .at { color: var(--txt2); font-weight: 700; }
.email-row select:disabled { background: #f2f5fa; }

/* ==================================================================
   界面精修(中度美化): 统一圆角 / 层次阴影 / 导航图标 / 动效
   ================================================================== */
:root {
  --primary-3: #6db1ff;
  --line2: #eef1f6;
  --radius-lg: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(31, 78, 147, .05);
  --shadow-md: 0 2px 8px rgba(31, 78, 147, .08), 0 8px 26px rgba(31, 78, 147, .07);
  --shadow-hover: 0 6px 18px rgba(31, 78, 147, .13), 0 14px 34px rgba(31, 78, 147, .10);
  --grad-main: linear-gradient(135deg, #1f4e93, #2a6fd6);
  --ring: 0 0 0 3px rgba(42, 111, 214, .12);
}

/* ---------- 背景 / 主体 ---------- */
body { background: #eef2f8 linear-gradient(180deg, #f6f8fc 0%, #eaeef6 100%) fixed; }
.main { background: transparent; }
.content { animation: fadeUp .26s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .content { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 224px;
  background: linear-gradient(180deg, #142f57 0%, #1c4a8c 58%, #21589f 100%);
  box-shadow: 4px 0 22px rgba(15, 34, 66, .22);
}
.brand { padding: 20px 18px; background: rgba(255,255,255,.04); }
.brand-badge {
  background: linear-gradient(135deg, #4d8ae6, #7fc0ff); border-radius: 11px;
  box-shadow: 0 4px 12px rgba(77, 138, 230, .45), inset 0 1px 0 rgba(255,255,255,.4);
}
.brand-txt b { font-size: 15.5px; letter-spacing: .6px; }
.brand-txt small { letter-spacing: .4px; font-size: 10.5px; }
.menu { padding: 12px 10px; }
.menu a {
  position: relative; gap: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; margin-bottom: 3px; transition: background .16s, color .16s, transform .16s;
}
.menu a:hover { background: rgba(255,255,255,.10); color: #fff; transform: translateX(2px); }
.menu a.on {
  background: linear-gradient(90deg, rgba(109,177,255,.28), rgba(109,177,255,.10));
  color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #ffd76a;
}
.menu .mi { width: 18px; text-align: center; font-size: 14px; line-height: 1; flex: none; filter: saturate(.85); }
.menu a.on .mi { filter: none; }
.menu .mt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot { padding: 12px 16px 14px; }
.side-foot a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; transition: .15s; }
.side-foot a:hover { background: rgba(255,255,255,.10); color: #fff; text-decoration: none; }
.side-foot .mi { font-size: 13px; }

/* ---------- 顶栏 ---------- */
.topbar {
  padding: 13px 26px; background: rgba(255,255,255,.88); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(31,78,147,.08), 0 4px 18px rgba(31,78,147,.06);
}
.topbar h1 { font-size: 17.5px; letter-spacing: .3px; position: relative; padding-left: 13px; }
.topbar h1::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 17px; border-radius: 3px; background: var(--grad-main);
}
.top-right { gap: 10px; }
.who { font-weight: 600; color: #4a5670; }
.ver-chip {
  font-family: Consolas, monospace; font-size: 11.5px; color: var(--primary-2);
  background: #eef4fd; border: 1px solid #d6e4fa; border-radius: 20px; padding: 3px 10px;
  letter-spacing: .3px; white-space: nowrap;
}
.ver-chip:hover { border-color: var(--primary-3); }

/* ---------- 卡片 ---------- */
.card {
  border: 1px solid rgba(31, 78, 147, .07); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.card.pad { padding: 20px 22px; }
.panel-title {
  display: flex; align-items: center; gap: 7px; font-size: 15px; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px dashed var(--line);
}
.panel-title::before {
  content: ''; width: 4px; height: 15px; border-radius: 3px; background: var(--grad-main); flex: none;
}
.panel-grid { gap: 18px; }

/* ---------- 表格 ---------- */
table.grid { min-width: 660px; }
table.grid th {
  background: linear-gradient(180deg, #f3f7fd, #eaf1fa);
  font-size: 12.5px; font-weight: 700; color: #3d4a63; padding: 11px 12px;
  border-bottom: 1px solid #dde5f1; letter-spacing: .3px;
}
table.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line2); }
table.grid tbody tr:nth-child(even) td { background: #fafbfe; }
table.grid tbody tr:hover td { background: #eef5ff; }
table.grid tbody tr:last-child td { border-bottom: none; }
table.grid tbody tr { transition: background .12s; }
.empty { color: #9aa5ba; }

/* ---------- 按钮 ---------- */
.btn {
  border-radius: 9px; padding: 8px 16px; font-weight: 500;
  box-shadow: var(--shadow-sm); transition: transform .14s, box-shadow .14s, border-color .14s, color .14s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad-main); box-shadow: 0 2px 8px rgba(31, 78, 147, .28);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(31, 78, 147, .32); }
.btn-ghost { border-color: transparent; background: #f2f5fa; }
.btn-sm { padding: 6px 12px; border-radius: 8px; }
.btn-block { border-radius: 10px; padding: 12px; letter-spacing: 2px; }

/* ---------- 页签 / 工具栏 ---------- */
.tabs { gap: 6px; border-bottom: none; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 16px;
  margin-bottom: 0; font-size: 13px; color: #5a677e; transition: .15s;
}
.tab:hover { text-decoration: none; color: var(--primary-2); border-color: #c7d9f5; background: #f7faff; }
.tab.on {
  color: #fff; font-weight: 600; border-color: transparent;
  background: var(--grad-main); box-shadow: 0 3px 10px rgba(31, 78, 147, .22);
}
.sec-title { font-size: 16.5px; letter-spacing: .3px; }
.search input {
  border-radius: 20px; padding: 8px 16px; border-color: #dde5f1; background: #fff;
  box-shadow: var(--shadow-sm); transition: .15s;
}
.search input:focus { border-color: var(--primary-2); box-shadow: var(--ring); }

/* ---------- 统计卡片 ---------- */
.stat-grid { gap: 16px; }
.stat-card {
  position: relative; overflow: hidden; border: 1px solid rgba(31,78,147,.07);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 17px 18px 17px 20px;
  transition: transform .16s, box-shadow .16s;
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad-main);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-num { font-size: 26px; letter-spacing: -.5px; }
.stat-label { font-size: 12.5px; }

/* ---------- 提示条 ---------- */
.alert {
  border-radius: 10px; padding: 11px 15px; border-left: 4px solid transparent; box-shadow: var(--shadow-sm);
}
.alert-ok { border-left-color: var(--ok); background: #eefaf3; }
.alert-err { border-left-color: var(--danger); background: #fef4f2; }

/* ---------- 表单 / 对话框 ---------- */
.fld input, .fld select, .fld textarea { border-radius: 9px; border-color: #dde5f1; background: #fff; }
.fld > span { font-weight: 600; color: #44506a; font-size: 12.5px; }
dialog.dlg { border-radius: 16px; box-shadow: 0 28px 80px rgba(10, 25, 50, .34); padding: 24px 26px; }
dialog.dlg h3 { display: flex; align-items: center; gap: 8px; font-size: 16.5px; }
dialog.dlg h3::before { content: ''; width: 4px; height: 16px; border-radius: 3px; background: var(--grad-main); }

/* ---------- 在线编辑单元格 ---------- */
td.ed { border-radius: 5px; }

/* ---------- 登录页 ---------- */
.login-wrap {
  background: linear-gradient(135deg, #12294c 0%, #1c4a8c 45%, #2a6fd6 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: ''; position: absolute; border-radius: 50%; opacity: .18; pointer-events: none;
}
.login-wrap::before { width: 460px; height: 460px; background: #6db1ff; top: -170px; right: -120px; }
.login-wrap::after  { width: 360px; height: 360px; background: #2a6fd6; bottom: -150px; left: -100px; }
/* 管理员上传了自定义登录背景时, 不叠加装饰光圈 */
.login-wrap.has-bg::before, .login-wrap.has-bg::after { display: none; }
.login-card {
  position: relative; z-index: 1; width: 412px; border-radius: 20px; padding: 34px 34px 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42); border: 1px solid rgba(255,255,255,.6);
}
.login-head h1 { font-size: 22px; letter-spacing: 1.5px; }
.login-card .btn-primary { border-radius: 10px; }
.login-ver { letter-spacing: .5px; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c3cfe2; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #a9b8d2; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.menu::-webkit-scrollbar { width: 5px; }
.menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border: 0; }

/* ---------- 页脚 ---------- */
.foot {
  border-top: 1px solid var(--line); background: rgba(255,255,255,.6);
  padding: 13px 24px; color: #8b94a7; font-size: 12px; text-align: center;
}

/* ---------- 其他 ---------- */
.import-form input[type=file] { margin: 10px 0 14px; }

/* ---------- 站内信 / 弹窗公告 (V1.8.0) ---------- */

/* 顶栏信封入口 + 未读红点 */
.msg-link {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  color: var(--txt); text-decoration: none; font-size: 13.5px; padding: 5px 8px;
  border-radius: 9px; transition: .15s;
}
.msg-link:hover { background: #eef3fb; color: var(--primary-2); text-decoration: none; }
.msg-link .mi { font-size: 16px; line-height: 1; }
.badge-dot {
  position: absolute; top: -3px; right: -5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--card);
}

/* 弹窗公告 */
.ann-dlg { max-width: 540px; width: 92%; }
.ann-head { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.ann-body { font-size: 14px; line-height: 1.9; color: var(--txt); white-space: pre-wrap; }
.ann-body img { max-width: 100%; }

/* 公告栏列表 */
.ann-list { display: flex; flex-direction: column; gap: 12px; }
.ann-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff;
}
.ann-item.is-new { border-color: #c7d9f5; background: #f7faff; box-shadow: var(--shadow-sm); }
.ann-item.is-seen { background: #fbfcfe; }
.ann-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ann-item-head b { font-size: 14.5px; color: #2c3853; }
.ann-item-body { font-size: 13.5px; line-height: 1.85; color: #4a5670; white-space: pre-wrap; }
.ann-item-foot { margin-top: 10px; }
.ann-date { font-size: 12px; margin-left: auto; }

/* 站内信列表未读行 */
tr.row-unread td { background: #fdf6ec !important; font-weight: 600; }

/* 站内信查看弹窗 */
.msg-dlg { max-width: 560px; width: 92%; }
.msg-meta {
  display: flex; flex-wrap: wrap; gap: 14px; color: var(--txt2); font-size: 12.5px;
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px dashed var(--line);
}
.msg-body { font-size: 14px; line-height: 1.9; color: var(--txt); white-space: pre-wrap; }

/* 设置页公告表单 */
.fld-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.switch-fld { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--txt2); }
.switch-fld select {
  padding: 6px 10px; border: 1px solid #dde5f1; border-radius: 8px; background: #fff; font-size: 13px;
}
