/* ==========================================================================
   公司内部管理系统 · PC 端样式
   风格：简洁商务 / 企业 OA 后台（深藏青导航 + 浅灰画布 + 扁平白卡片）
   ========================================================================== */
:root {
  /* 主色 */
  --brand: #1d4ed8;
  --brand-700: #1a44bd;
  --brand-50: #eef3ff;
  --brand-100: #dbe6fe;
  /* 导航（深藏青） */
  --navy: #0d2644;
  --navy-2: #123156;
  --navy-line: rgba(255, 255, 255, .08);
  --navy-text: rgba(255, 255, 255, .74);
  --navy-muted: rgba(255, 255, 255, .38);
  /* 中性 */
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --panel-3: #f2f5f9;
  --line: #e4e8ef;
  --line-2: #eef1f6;
  --text: #17202e;
  --text-2: #4a5768;
  --muted: #8b94a6;
  /* 语义 */
  --danger: #d92d20; --danger-w: #fef3f2;
  --warn: #b54708; --warn-w: #fffaeb;
  --ok: #067647; --ok-w: #ecfdf3;
  --info: #026aa2; --info-w: #f0f9ff;
  /* 结构 */
  --r: 8px;
  --r-lg: 10px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .04);
  --sh-2: 0 12px 32px rgba(16, 24, 40, .12);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side-w: 216px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccd3de; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b3bdcc; }

/* 线性图标 */
svg.i { width: 16px; height: 16px; flex: 0 0 auto; display: block; }
svg.i.m { width: 18px; height: 18px; }
svg.i.l { width: 20px; height: 20px; }

/* ==========================================================================
   登录页
   ========================================================================== */
.login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px;
  background:
    radial-gradient(900px 420px at 12% -8%, #e6eefc 0%, transparent 58%),
    radial-gradient(760px 420px at 106% 108%, #e7f1ea 0%, transparent 52%),
    #f2f5f9;
}
.login-box {
  width: 100%; max-width: 400px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 48px rgba(13, 38, 68, .10);
}
.lg-brand { position: relative; padding: 30px 32px 24px; background: linear-gradient(158deg, #103055 0%, var(--navy) 58%, #0a1e37 100%); color: #fff; text-align: center; overflow: hidden; }
.lg-brand::after { content: ""; position: absolute; right: -70px; bottom: -110px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(93, 156, 255, .22), transparent 68%); }
.lg-logo { width: 46px; height: 46px; border-radius: 11px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16); display: grid; place-items: center; color: #fff; margin: 0 auto 12px; }
.lg-brand h1 { font-size: 18px; font-weight: 600; letter-spacing: .4px; margin: 0; }
.lg-form { padding: 28px 32px 24px; }
.ip-wrap { position: relative; }
.ip-wrap > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ip-wrap .input { padding-left: 34px; height: 40px; }
.lg-btn { width: 100%; height: 40px; justify-content: center; font-size: 14.5px; letter-spacing: 3px; margin-top: 4px; }
/* 登录页背景预置（商务科技风：辉光 + 科技网格，纯 CSS；管理页预览块 .bg-prev 复用同一套渐变） */
.login.bg-1, .bg-prev.bg-1 {
  background:
    radial-gradient(900px 460px at 88% -10%, rgba(59, 125, 221, .14), transparent 60%),
    radial-gradient(760px 420px at -8% 108%, rgba(16, 185, 129, .10), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(13, 38, 68, .035) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(13, 38, 68, .035) 47px 48px),
    linear-gradient(165deg, #f4f7fb 0%, #eef3f9 55%, #e8eef6 100%);
}
.login.bg-2, .bg-prev.bg-2 {
  background:
    radial-gradient(1000px 520px at 85% -12%, rgba(56, 132, 255, .32), transparent 62%),
    radial-gradient(820px 420px at -10% 112%, rgba(0, 224, 255, .16), transparent 58%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255, 255, 255, .045) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 255, 255, .045) 39px 40px),
    linear-gradient(160deg, #0a1628 0%, #0f2540 55%, #14335c 100%);
}
.login.bg-3, .bg-prev.bg-3 {
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(45, 212, 191, .26), transparent 60%),
    radial-gradient(760px 420px at 105% 110%, rgba(59, 130, 246, .22), transparent 58%),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(255, 255, 255, .04) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(255, 255, 255, .04) 47px 48px),
    linear-gradient(160deg, #062a30 0%, #0b3d46 52%, #0f4c5c 100%);
}
.login.bg-4, .bg-prev.bg-4 {
  background:
    radial-gradient(980px 520px at 80% -14%, rgba(129, 140, 248, .34), transparent 62%),
    radial-gradient(700px 400px at -6% 112%, rgba(236, 72, 153, .18), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 43px, rgba(255, 255, 255, .035) 43px 44px),
    repeating-linear-gradient(90deg, transparent 0 43px, rgba(255, 255, 255, .035) 43px 44px),
    linear-gradient(160deg, #171233 0%, #251d52 55%, #312a6e 100%);
}
.login.bg-5, .bg-prev.bg-5 {
  background:
    radial-gradient(900px 500px at 50% -18%, rgba(148, 163, 184, .22), transparent 60%),
    radial-gradient(700px 380px at 108% 108%, rgba(20, 184, 166, .12), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 51px, rgba(255, 255, 255, .04) 51px 52px),
    repeating-linear-gradient(90deg, transparent 0 51px, rgba(255, 255, 255, .04) 51px 52px),
    linear-gradient(165deg, #0c1116 0%, #161e27 55%, #1f2b38 100%);
}
.login.bg-6, .bg-prev.bg-6 {
  background:
    radial-gradient(920px 480px at 82% -10%, rgba(56, 189, 248, .30), transparent 62%),
    radial-gradient(720px 420px at -8% 112%, rgba(59, 130, 246, .20), transparent 58%),
    linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .05) 50%, transparent 58%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255, 255, 255, .04) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 255, 255, .04) 39px 40px),
    linear-gradient(160deg, #07182b 0%, #0c2a4d 52%, #123a6b 100%);
}
/* 系统管理 → 登录页背景设置 */
.bg-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bg-tile {
  position: relative; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer;
  background: var(--panel-2); transition: .15s;
}
.bg-tile:hover { border-color: var(--brand); transform: translateY(-2px); }
.bg-tile.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 125, 221, .18); }
.bg-tile > .badge { position: absolute; top: 8px; right: 8px; }
.bg-prev { height: 96px; display: grid; place-items: center; color: rgba(255, 255, 255, .55); background-size: cover; }
.bg-prev.bg-1 { color: rgba(13, 38, 68, .4); }
.bg-tile .t { display: flex; align-items: baseline; gap: 8px; padding: 9px 12px; }
.bg-tile .t b { font-size: 13.5px; }
.bg-tile .t span { font-size: 12px; color: var(--muted); }

.lg-div { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; font-size: 12px; color: var(--muted); }
.lg-div::before, .lg-div::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.demo-users { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.demo-users button {
  text-align: left; padding: 8px 11px; border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 7px; cursor: pointer; font-size: 12px; color: var(--muted); line-height: 1.45; transition: .15s;
}
.demo-users button:hover { border-color: var(--brand-100); background: var(--brand-50); }
.demo-users button b { display: block; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.demo-users button:hover b { color: var(--brand); }

/* ==========================================================================
   骨架
   ========================================================================== */
.app { display: flex; height: 100vh; overflow: hidden; }

/* 侧边导航 */
.side { width: var(--side-w); flex: 0 0 auto; background: linear-gradient(180deg, var(--navy-2), var(--navy)); display: flex; flex-direction: column; transition: width .18s ease; }
.app.collapsed .side { width: 62px; }
.brand { display: flex; align-items: center; gap: 10px; height: 62px; padding: 0 16px; border-bottom: 1px solid var(--navy-line); flex: 0 0 auto; overflow: hidden; }
.brand .logo { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px; background: linear-gradient(150deg, #3b82f6, #1d4ed8); color: #fff; display: grid; place-items: center; }
.brand .txt { min-width: 0; }
.brand b { display: block; font-size: 13.5px; font-weight: 600; color: #fff; letter-spacing: .3px; white-space: nowrap; }
.brand span { display: block; font-size: 11px; color: var(--navy-muted); white-space: nowrap; }
.app.collapsed .brand { padding: 0 16px; }
.app.collapsed .brand .txt { display: none; }

.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 10px 20px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); }
.nav > a {
  position: relative; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px;
  border-radius: 7px; color: var(--navy-text); font-size: 13.5px; white-space: nowrap; transition: .15s;
}
.nav > a + a { margin-top: 2px; }
.nav > a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav > a.active { background: rgba(59, 130, 246, .22); color: #fff; font-weight: 600; }
.nav > a.active::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #60a5fa; }
.nav > a .ico { width: 18px; display: grid; place-items: center; flex: 0 0 auto; opacity: .92; }
.nav > a .txt { overflow: hidden; text-overflow: ellipsis; }
.nav > a .badge-n { margin-left: auto; background: #e5484d; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; line-height: 16px; font-weight: 600; }

/* ---- 二级悬浮菜单：一级分组按钮 + 悬浮二级面板（每列 ≤8 项自动分列） ---- */
.nav-item { position: relative; margin-top: 2px; }
.nav-item .nv {
  width: 100%; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px;
  border-radius: 7px; border: 0; background: transparent; cursor: pointer; text-align: left; position: relative;
  color: var(--navy-text); font-size: 13.5px; white-space: nowrap; transition: .15s; font-family: inherit;
}
.nav-item .nv:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active .nv { background: rgba(59, 130, 246, .22); color: #fff; font-weight: 600; }
.nav-item.active .nv::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #60a5fa; }
.nav-item .nv .ico { width: 18px; display: grid; place-items: center; flex: 0 0 auto; opacity: .92; }
.nav-item .nv .txt { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.nav-item .nv .badge-n { background: #e5484d; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; line-height: 16px; font-weight: 600; }
.nav-item .nv .chev { flex: 0 0 auto; opacity: .5; display: grid; place-items: center; }
.nav-item .nv .chev .i { width: 13px; }
.nav-fly {
  position: fixed; z-index: 95; display: none; min-width: 190px; padding: 10px 10px 8px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px;
  box-shadow: 0 14px 38px rgba(5, 15, 35, .45);
}
.nav-fly.show, .nav-item.open .nav-fly { display: block; }
.nav-fly-hd { font-size: 11px; letter-spacing: 1px; color: var(--navy-muted); padding: 2px 10px 8px; white-space: nowrap; }
.nav-fly-grid { display: grid; grid-auto-flow: column; align-items: start; gap: 2px 10px; }
.nav-fly a {
  position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; min-width: 150px;
  border-radius: 7px; color: var(--navy-text); font-size: 13px; white-space: nowrap; transition: .15s;
}
.nav-fly a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-fly a.active { background: rgba(59, 130, 246, .22); color: #fff; font-weight: 600; }
.nav-fly a .ico { width: 17px; display: grid; place-items: center; flex: 0 0 auto; opacity: .92; }
.nav-fly a .txt { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.nav-fly a .badge-n { background: #e5484d; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; line-height: 16px; font-weight: 600; }

.app.collapsed .nav { padding: 8px 8px 20px; }
.app.collapsed .nav > a { justify-content: center; padding: 0; }
.app.collapsed .nav > a + a { margin-top: 4px; }
.app.collapsed .nav > a .txt, .app.collapsed .nav > a .badge-n { display: none; }
.app.collapsed .nav-item .nv { justify-content: center; padding: 0; }
.app.collapsed .nav-item .nv .txt, .app.collapsed .nav-item .nv .badge-n, .app.collapsed .nav-item .nv .chev { display: none; }
.side-foot { flex: 0 0 auto; padding: 12px 16px; border-top: 1px solid var(--navy-line); font-size: 11px; color: var(--navy-muted); white-space: nowrap; overflow: hidden; }
.side-foot a { color: rgba(255, 255, 255, .68); display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.side-foot a:hover { color: #fff; }
.app.collapsed .side-foot { padding: 12px 0; text-align: center; }
.app.collapsed .side-foot .ft-txt { display: none; }

/* 主区 */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; flex: 0 0 auto; background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
}
.ph { min-width: 0; }
.ph-crumb { font-size: 11.5px; color: var(--muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-title { font-size: 16px; font-weight: 600; letter-spacing: .2px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2); padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.mode-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.mode-pill.demo { border-color: #f3e0b5; background: var(--warn-w); color: var(--warn); }
.mode-pill.demo::before { background: #e9a23b; }
.mode-pill.mssql { border-color: #b9e3cd; background: var(--ok-w); color: var(--ok); }
.mode-pill.mssql::before { background: #16a34a; }
.icon-btn {
  position: relative; width: 34px; height: 34px; border: 1px solid var(--line); background: var(--panel);
  border-radius: 8px; cursor: pointer; display: grid; place-items: center; color: var(--text-2); transition: .15s;
}
.icon-btn:hover { border-color: var(--brand-100); background: var(--brand-50); color: var(--brand); }
.icon-btn .dot {
  position: absolute; top: -6px; right: -6px; background: #e5484d; color: #fff; font-size: 10px;
  min-width: 17px; height: 17px; line-height: 17px; border-radius: 9px; padding: 0 4px; font-weight: 600;
  border: 2px solid #fff; box-sizing: content-box;
}
.user-box { padding-left: 14px; border-left: 1px solid var(--line); }
.user-btn { display: flex; align-items: center; gap: 9px; border: 1px solid transparent; background: none; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.user-btn:hover { background: var(--panel-2); }
.avatar { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 8px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 13.5px; font-weight: 600; border: 1px solid var(--brand-100); }
.user-box .who { line-height: 1.3; text-align: left; }
.user-box .who b { display: block; font-size: 13px; font-weight: 600; }
.user-box .who span { display: block; font-size: 11px; color: var(--muted); }
.user-box svg.chev { color: var(--muted); }

.content { flex: 1; overflow-y: auto; padding: 18px 20px 44px; }

/* 下拉菜单 */
.dd { position: relative; display: inline-flex; }
.dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-2); padding: 5px;
  z-index: 40; display: none;
}
.dd.open > .dd-menu { display: block; }
.dd-menu.right { left: auto; right: 0; }
.dd-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: none; background: none;
  padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--text-2); cursor: pointer;
}
.dd-menu button:hover { background: var(--panel-3); color: var(--text); }
.dd-menu button.danger { color: var(--danger); }
.dd-menu button.danger:hover { background: var(--danger-w); }
.dd-hd { padding: 8px 10px 9px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.dd-sep { height: 1px; background: var(--line-2); margin: 4px 0; }

/* ==========================================================================
   通用元件
   ========================================================================== */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; }
.card-hd { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.card-hd h3 { position: relative; font-size: 14px; font-weight: 600; padding-left: 11px; }
.card-hd h3::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 14px; border-radius: 2px; background: var(--brand); }
.card-hd .sub { font-size: 12px; color: var(--muted); }
.card-hd .spacer { flex: 1; }
.card-bd { padding: 16px; }
.card-bd.tight { padding: 4px 8px; }
.card-bd.tight .grid th:first-child, .card-bd.tight .grid td:first-child { padding-left: 10px; }
.card-note { padding: 12px 16px; font-size: 12.5px; color: var(--muted); line-height: 1.85; }
.card-note b { color: var(--text-2); }
.card-note code { font-family: var(--mono); font-size: 12px; background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; color: var(--text-2); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text-2); border-radius: 6px;
  font-size: 13px; cursor: pointer; white-space: nowrap; transition: .15s;
}
.btn:hover { background: var(--panel-3); color: var(--text); border-color: #d5dbe6; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn.danger { color: var(--danger); border-color: #f4c9c5; background: var(--danger-w); }
.btn.danger:hover { background: #fbe0dd; color: var(--danger); border-color: #eeb1ab; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 27px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-link { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; color: var(--brand); cursor: pointer; padding: 0; font-size: 13px; }
.btn-link:hover { color: var(--brand-700); text-decoration: underline; }
.btn-link.danger { color: var(--danger); }
.btn-link.danger:hover { color: #b42318; }
.row-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 输入 */
.input, select.input, textarea.input {
  width: 100%; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 0 10px; outline: none; font-size: 13.5px; transition: .15s;
}
textarea.input { height: auto; padding: 8px 10px; line-height: 1.6; resize: vertical; }
select.input { padding-right: 28px; appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b94a6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, .1); }
.input:disabled { background: var(--panel-3); color: var(--muted); cursor: not-allowed; }
.search { position: relative; width: 240px; }
.search .input { padding-left: 32px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
label.fld { display: block; margin-bottom: 14px; }
label.fld > .lb { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
label.fld > .lb .req { color: var(--danger); margin-left: 3px; }
label.fld .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.readonly-val { min-height: 34px; display: flex; align-items: center; padding: 6px 10px; background: var(--panel-3); border: 1px solid var(--line-2); border-radius: 6px; color: var(--text-2); font-size: 13.5px; }
.grp-between { display: flex; gap: 8px; align-items: center; }

/* 面板头 + 下划线页签 */
.panel-hd { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-hd .spacer { flex: 1; }
.panel-actions { display: flex; align-items: center; gap: 8px; padding: 9px 0; margin-left: auto; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button {
  position: relative; border: none; background: none; padding: 14px 12px 13px; font-size: 13.5px;
  color: var(--text-2); cursor: pointer; white-space: nowrap; transition: .15s; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.tabs button:hover { color: var(--brand); }
.tabs button.active { color: var(--brand); font-weight: 600; }
.tabs button.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px 2px 0 0; }

.toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }
.toolbar .tabs { border: none; }
.toolbar .tabs button { padding: 7px 12px; border-radius: 6px; }
.toolbar .tabs button.active { background: var(--brand-50); }
.toolbar .tabs button.active::after { display: none; }

/* 表格 */
.table-wrap { overflow: auto; max-height: calc(100vh - 300px); border-radius: 0 0 var(--r) var(--r); }
.card .table-wrap { border-radius: 0; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.grid th {
  position: sticky; top: 0; z-index: 2; background: var(--panel-2); color: #5a6577; font-weight: 600;
  font-size: 12.5px; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.grid td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--text-2); white-space: nowrap; }
table.grid td.wrap { white-space: normal; min-width: 200px; max-width: 380px; word-break: break-word; }
table.grid tbody tr:hover td { background: #f7f9fd; }
table.grid tbody tr:last-child td { border-bottom: none; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.mono, table.grid .mono { font-family: var(--mono); font-size: 12.5px; }
table.grid td.strong { color: var(--text); font-weight: 600; }
table.grid .empty { text-align: center; color: var(--muted); padding: 40px 0; }
.nowrap { white-space: nowrap; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 徽标 */
.badge { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; background: var(--panel-3); color: var(--text-2); border: 1px solid transparent; white-space: nowrap; }
.badge.b-ok { background: var(--ok-w); color: var(--ok); border-color: #cceada; }
.badge.b-warn { background: var(--warn-w); color: var(--warn); border-color: #f5e2b8; }
.badge.b-danger { background: var(--danger-w); color: var(--danger); border-color: #f7d3d0; }
.badge.b-info { background: var(--info-w); color: var(--info); border-color: #cbe7f5; }
.badge.b-primary { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
.badge.b-muted { background: var(--panel-3); color: var(--muted); border-color: var(--line); }

/* 指标卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { display: flex; align-items: center; gap: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; transition: .15s; }
.stat .si { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 9px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.stat .body { min-width: 0; }
.stat .k { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v { font-size: 24px; font-weight: 650; letter-spacing: -.5px; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--text); }
.stat .t { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.danger .si { background: var(--danger-w); color: var(--danger); }
.stat.danger .v { color: var(--danger); }
.stat.warn .si { background: var(--warn-w); color: var(--warn); }
.stat.warn .v { color: var(--warn); }
.stat.ok .si { background: var(--ok-w); color: var(--ok); }
.stat.ok .v { color: var(--ok); }
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { border-color: var(--brand-100); box-shadow: 0 2px 10px rgba(29, 78, 216, .08); }

.cols { display: grid; gap: 14px; align-items: start; }
.cols.c2 { grid-template-columns: 1fr 1fr; }
.cols.c2-13 { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 1180px) { .cols.c2, .cols.c2-13 { grid-template-columns: 1fr; } }

/* 列表行 */
.list-line { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.list-line:last-child { border-bottom: none; }
.list-line:hover { background: #fafbfe; }
.list-line .t { flex: 1; min-width: 0; }
.list-line .t .ttl { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-line .d { color: var(--muted); font-size: 11.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 22px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }
.form-sec { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; font-size: 13px; font-weight: 600; color: var(--text); }
.form-sec::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.form-foot { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line-2); background: var(--panel-2); border-radius: 0 0 var(--r) var(--r); }
.form-foot .spacer { flex: 1; }
.detail-wrap { overflow: auto; }
.detail-wrap .grid th, .detail-wrap .grid td { padding: 6px 10px; }
.detail-wrap .grid input, .detail-wrap .grid select { border: 1px solid transparent; background: transparent; padding: 5px 7px; width: 100%; border-radius: 5px; }
.detail-wrap .grid input:hover, .detail-wrap .grid select:hover { border-color: var(--line); }
.detail-wrap .grid input:focus, .detail-wrap .grid select:focus { border-color: var(--brand); background: #fff; }

/* 详情描述表 */
.desc { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.desc .di { display: flex; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); min-height: 46px; }
.desc .di.full { grid-column: 1 / -1; border-right: none; }
.desc .di .dl { flex: 0 0 96px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.desc .di .dv { flex: 1; min-width: 0; color: var(--text); font-size: 13.5px; word-break: break-word; line-height: 1.7; }
@media (max-width: 900px) { .desc { grid-template-columns: 1fr; } .desc .di { border-right: none; } }

/* 附件 */
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.attach { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; background: var(--panel-2); font-size: 12.5px; }
.attach img { width: 30px; height: 30px; object-fit: cover; border-radius: 5px; }
.attach a { color: var(--text-2); }
.attach a:hover { color: var(--brand); }

/* 二期 HR：模板占位符说明 */
.ph-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.ph-chip i { font-style: normal; color: var(--muted, #7a8aa0); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.modal { width: 100%; max-width: 560px; max-height: 86vh; display: flex; flex-direction: column; background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--sh-2); overflow: hidden; animation: pop .16s ease; }
.modal.wide { max-width: 860px; }
.modal-hd { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line-2); font-size: 14.5px; font-weight: 600; }
.modal-hd .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 2px; }
.modal-hd .x:hover { color: var(--text); }
.modal-bd { padding: 18px 20px; overflow-y: auto; }
.modal-ft { display: flex; justify-content: flex-end; gap: 10px; padding: 13px 20px; border-top: 1px solid var(--line-2); background: var(--panel-2); }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }

/* 审批轨迹 */
.timeline { padding: 2px 0 0 4px; }
.tl-item { position: relative; padding: 0 0 18px 24px; border-left: 1px solid var(--line); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 2px; }
.tl-item::before { content: ""; position: absolute; left: -6px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid #cbd2de; }
.tl-item.done::before { border-color: var(--ok); background: var(--ok); }
.tl-item.curr::before { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.tl-item.rej::before { border-color: var(--danger); background: var(--danger); }
.tl-item .tn { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; margin-bottom: 1px; }
.tl-item .tm { font-size: 11.5px; color: var(--muted); }
.tl-item .tc { font-size: 12.5px; color: var(--text-2); margin-top: 3px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 10px; }

/* 柱状图 */
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 168px; padding: 10px 2px 0; }
.chart-bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.chart-bars .bar i { display: block; width: 100%; max-width: 34px; background: linear-gradient(180deg, #4f86f7, var(--brand)); border-radius: 4px 4px 2px 2px; min-height: 3px; transition: .2s; }
.chart-bars .bar:hover i { background: linear-gradient(180deg, #3568ef, var(--brand-700)); }
.chart-bars .bar b { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.chart-bars .bar span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; max-width: 100%; }

/* 空状态 */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 46px 20px; color: var(--muted); font-size: 13px; }
.empty-state svg { color: #c3cbd8; }

/* 提示 */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 9px; background: var(--panel); color: var(--text);
  padding: 11px 15px; border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 6px; font-size: 13px; box-shadow: var(--sh-2); max-width: 400px; animation: slide .2s ease;
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: #e9a23b; }
.toast svg { flex: 0 0 auto; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--danger); }
.toast.warn svg { color: #e9a23b; }
.toast svg.def { color: var(--brand); }
@keyframes slide { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 分页 */
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.pager .spacer { flex: 1; }
.pager button { height: 28px; padding: 0 11px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; cursor: pointer; color: var(--text-2); font-size: 12.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.pager button:hover:not(:disabled) { border-color: var(--brand-100); color: var(--brand); background: var(--brand-50); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* 杂项 */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px; color: var(--muted); font-size: 13px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; color: var(--text); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mb0 { margin-bottom: 0; }
.danger-text { color: var(--danger); }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
pre.json { background: #0f1e33; color: #cfe0ff; padding: 14px; border-radius: var(--r); overflow: auto; font-size: 12px; max-height: 320px; font-family: var(--mono); }

/* 响应式：窄屏收起侧栏 */
@media (max-width: 1100px) {
  .app:not(.collapsed) .side { width: 62px; }
  .app:not(.collapsed) .brand .txt, .app:not(.collapsed) .nav > a .txt, .app:not(.collapsed) .nav > a .badge-n,
  .app:not(.collapsed) .nav-item .nv .txt, .app:not(.collapsed) .nav-item .nv .badge-n, .app:not(.collapsed) .nav-item .nv .chev,
  .app:not(.collapsed) .side-foot .ft-txt { display: none; }
  .app:not(.collapsed) .nav > a, .app:not(.collapsed) .nav-item .nv { justify-content: center; padding: 0; }
}
@media (max-width: 760px) {
  .lg-form { padding: 24px 20px; }
  .content { padding: 14px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .user-box .who { display: none; }
}

/* ---------------- 登录页 · 忘记密码 / 找回密码弹窗 ---------------- */
.lg-row { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 4px; }
.lg-row a { font-size: 12.5px; color: var(--brand); text-decoration: none; }
.lg-row a:hover { text-decoration: underline; }

.fg-tip { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.fg-err { min-height: 18px; margin-top: 8px; font-size: 12.5px; color: var(--danger); }
.fg-ok { display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 14px; color: var(--ok); }
.fg-ok svg { width: 18px; height: 18px; flex: none; }

/* ---------------- 登录页 · 钉钉关联登录（预留入口） ---------------- */
.lg-btn.dingtalk { margin-top: 10px; background: #1677ff; color: #fff; border: none; gap: 8px; justify-content: center; }
.lg-btn.dingtalk:hover { background: #3c92ff; }
.lg-btn.dingtalk svg { width: 16px; height: 16px; }

/* ---------------- 多条件筛选栏（办卡信息登记等） ---------------- */
.filter-bar {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px dashed var(--line-2); background: var(--panel-2);
}
.filter-bar .flt-items { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.filter-bar .flt { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
.filter-bar .flt .input { min-width: 130px; height: 30px; font-size: 12.5px; padding: 4px 8px; }
.filter-bar .flt input[type="date"].input { min-width: 128px; }
.filter-bar .flt-btns { display: flex; gap: 6px; }

/* ============================ 标签页栏 ============================ */
.tabbar { display: flex; align-items: flex-end; gap: 4px; padding: 8px 16px 0; overflow-x: auto; border-bottom: 1px solid var(--line-2); background: var(--panel-2); scrollbar-width: thin; }
.tabbar::-webkit-scrollbar { height: 5px; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-bottom: none; border-radius: 8px 8px 0 0; background: var(--panel-3); color: var(--text-2); font-size: 12.5px; cursor: pointer; white-space: nowrap; user-select: none; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel); color: var(--text); font-weight: 600; border-color: var(--line); position: relative; }
.tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--panel); }
.tab .tc { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; font-size: 14px; line-height: 1; color: var(--muted); }
.tab .tc:hover { background: var(--line-2); color: var(--danger); }

/* 自定义品牌 Logo（图片模式）：铺满原图标容器 */
.lg-logo img, .logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }
