:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e6e8ec;
  --line-strong: #d4d8de;
  --text: #1d2129;
  --muted: #86909c;
  --primary: #2b6be4;
  --primary-soft: #eaf1fe;
  --danger: #d93f3f;
  --danger-soft: #fdeeee;
  --warn: #b26a00;
  --warn-soft: #fdf3e3;
  --ok: #1a7f5a;
  --ok-soft: #e7f5ef;
  --radius: 12px;
  --pad: 32px;
  --pad-top: 24px;
}

* { box-sizing: border-box; }

html, body { width: 100%; overflow-x: hidden; }
/* overflow-x:hidden 会让 position:sticky 整体失效（后台侧栏固定的元凶）。
   新版浏览器改用 clip：同样裁掉横向溢出，但不建立滚动容器，sticky 正常工作。 */
@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }

.topbar {
  /* 毛玻璃：半透明 + 背景虚化，滚动时下方内容从导航下面虚化经过 */
  background: rgba(255, 255, 255, .66);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(11, 25, 51, .07);
  position: sticky; top: 0; z-index: 20;
  transition: background .22s ease, box-shadow .22s ease;
}
body.scrolled .topbar {
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 8px 24px rgba(13, 30, 60, .07);
}
/* 老浏览器没有 backdrop-filter：退回不透明，保证文字清楚 */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar { background: #fff; }
  body.scrolled .topbar { background: #fff; }
}

.topbar-inner {
  width: 100%; height: 58px; padding: 0 32px;
  display: flex; align-items: center; gap: 28px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 500; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-divider { width: 1px; height: 18px; background: var(--line); }
.brand-name { font-size: 13px; color: var(--muted); letter-spacing: .3px; }

.nav { display: flex; gap: 22px; flex: 1; }
.nav-link { color: var(--muted); font-size: 13px; padding: 18px 0; border-bottom: 2px solid transparent; }
.nav-link.on { color: var(--text); border-bottom-color: var(--primary); }
.nav-link:hover { color: var(--text); }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.who { font-size: 13px; color: var(--muted); }

.wrap { width: 100%; padding: var(--pad-top) var(--pad) 48px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}

.page-title { font-size: 18px; font-weight: 500; margin: 0 0 4px; }
.page-sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px;
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.btn:hover { opacity: .92; }
.btn-ghost {
  padding: 6px 14px; border-radius: 8px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text); font-size: 13px;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.inline { display: inline; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=email], select, textarea {
  width: 100%; padding: 9px 12px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; min-height: 72px; }

.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }

.section-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 6px 0 14px; font-size: 14px; font-weight: 500;
}
.section-head .count { font-size: 12px; color: var(--muted); font-weight: 400; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 16px;
}

.app-card {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 12px 14px; display: flex; flex-direction: column; align-items: center;
  text-align: center; color: var(--text); transition: border-color .15s, transform .15s;
}
.app-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.app-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; margin-bottom: 10px;
  background: var(--primary-soft); color: var(--primary);
}
.app-name { font-size: 14px; font-weight: 600; }
.app-desc { font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 18px; line-height: 1.5; }

/* 卡片底部的可见范围徽标（内网 / 公开） */
.tile-vis {
  margin-top: 8px; font-size: 11px; padding: 2px 10px;
  border-radius: 999px; white-space: nowrap;
}
.tile-vis-intranet { background: #f2f3f5; color: #6b7280; }
.tile-vis-public   { background: var(--ok-soft); color: var(--ok); }
.tag { margin-top: 8px; font-size: 11px; padding: 1px 7px; border-radius: 5px; }
.tag-public { background: var(--ok-soft); color: var(--ok); }
.tag-locked { background: var(--warn-soft); color: var(--warn); }

.hero {
  position: relative;
  width: calc(100% + var(--pad) * 2);
  margin: calc(var(--pad-top) * -1) calc(var(--pad) * -1) 22px;
  height: 280px;
  overflow: hidden;
  background: #16305e;
}
.hero-slide {
  position: absolute; inset: 0; display: block;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0; transition: opacity .5s ease;
}
.hero-slide.on { opacity: 1; }
.hero-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad); color: #fff;
}
.hero-fallback h1 { font-size: 24px; font-weight: 500; margin: 0 0 8px; }
.hero-fallback p { font-size: 13px; margin: 0; color: #b9c9e6; }
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 14px;
  display: flex; justify-content: center; gap: 7px;
}
.hero-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); }
.hero-dot.on { background: #fff; }

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px; align-items: start;
}

.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-title { font-size: 15px; font-weight: 500; }
.panel-link { font-size: 12px; color: var(--muted); }
.panel-link:hover { color: var(--primary); }

.todo-item { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.todo-item:last-child { border-bottom: none; }
.todo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-top: 7px; flex: 0 0 7px; }
.todo-title { font-size: 13px; margin: 0; }
.todo-body { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.todo-time { font-size: 11px; color: var(--muted); margin-top: 4px; }

.app-tile {
  position: relative;
  background: var(--card); border: 1px solid #eef0f3; border-radius: 12px;
  padding: 20px 12px 16px; display: flex; flex-direction: column; align-items: center;
  text-align: center; transition: box-shadow .15s, border-color .15s;
}
.app-tile:hover { border-color: #e3e6eb; box-shadow: 0 4px 14px rgba(23,35,61,.08); }
.tile-action { position: absolute; top: 8px; right: 8px; }
.mini-btn {
  width: 24px; height: 24px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line-strong); background: #fff; color: var(--muted);
  font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center;
  font-family: inherit; padding: 0;
}
.mini-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.mini-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.mini-btn.on:hover { background: #1f57c4; border-color: #1f57c4; color: #fff; }

.admin-layout { display: flex; width: 100%; min-height: calc(100vh - 58px); align-items: stretch; }
.admin-side {
  width: 210px; flex: 0 0 210px; background: var(--card);
  border-right: 1px solid var(--line); padding: 18px 12px;
  align-self: flex-start;
}
.side-group { font-size: 11px; color: var(--muted); padding: 8px 12px 6px; }
.side-link { display: block; padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--text); margin-bottom: 2px; }
.side-link:hover { background: #f5f6f8; }
.side-link.on { background: var(--primary-soft); color: var(--primary); }
.admin-main { flex: 1; min-width: 0; padding: var(--pad-top) var(--pad) 48px; }

.auth-split { display: flex; width: 100%; min-height: 100vh; }
.auth-brand {
  flex: 0 0 46%; background: #16305e; color: #fff;
  padding: 56px 56px 40px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand .logo { display: flex; align-items: center; gap: 12px; font-size: 13px; }
/* 蓝色 logo 放到深色底上会糊，垫一块白色圆角片 */
.auth-brand .logo .logo-chip {
  background: #fff; border-radius: 10px; padding: 7px 12px;
  display: flex; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.auth-brand .logo .logo-chip img { height: 26px; width: auto; display: block; }
.auth-brand .logo .logo-text { color: #cddcf5; letter-spacing: .3px; font-size: 13px; }
.auth-brand h2 { font-size: 30px; font-weight: 500; line-height: 1.35; margin: 0 0 14px; }
.auth-brand p { font-size: 14px; color: #b9c9e6; margin: 0; max-width: 380px; }
.auth-brand .copy { font-size: 12px; color: #7d93ba; }

.auth-form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--card); }
.auth-form { width: 100%; max-width: 360px; }
.auth-form .title { font-size: 22px; font-weight: 500; margin: 0 0 6px; }
.auth-form .sub { font-size: 13px; color: var(--muted); margin: 0 0 28px; }

@media (max-width: 1024px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
}

@media (max-width: 720px) {
  :root { --pad: 16px; --pad-top: 16px; }
  .topbar-inner { padding: 0 16px; gap: 14px; }
  /* 窄屏上只留图形，腾出空间给导航 */
  .brand-logo { height: 26px; }
  .brand-divider, .brand-name { display: none; }
  .wrap, .admin-main { padding: var(--pad-top) var(--pad) 40px; }
  .admin-side { width: 148px; flex: 0 0 148px; padding: 12px 8px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .hero { height: 200px; }
  .hero-fallback h1 { font-size: 19px; }
}

input[type=file] { font-size: 13px; font-family: inherit; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 5px; background: #f2f3f5; color: var(--muted); }
.badge-on { background: var(--ok-soft); color: var(--ok); }
.badge-off { background: var(--danger-soft); color: var(--danger); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 500; margin-top: 2px; }

.checkbox-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.checkbox-list label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; margin: 0; }
.checkbox-list input { width: auto; }

.empty { text-align: center; color: var(--muted); padding: 48px 20px; font-size: 13px; }
.empty .btn { margin-top: 14px; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 28px 24px; }

/* ───── 页面标题条（审批、安全、邮件等页共用）───── */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 4px;
}
.page-head h1 { font-size: 19px; font-weight: 500; margin: 0 0 4px; }
.page-head .page-sub { margin-bottom: 20px; }

/* ───── 审批状态 ───── */
.status-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.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-cancelled { background: #f2f3f5;            color: var(--muted); }

/* ───── 申请详情：左内容右操作 ───── */
.req-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.req-layout > aside { display: flex; flex-direction: column; gap: 18px; }
.req-layout .card + .card { margin-top: 18px; }
.req-layout aside .card + .card { margin-top: 0; }

/* ───── 时间线 ───── */
.timeline { position: relative; padding-left: 4px; }
.tl-item { position: relative; padding: 0 0 20px 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: 5px; top: 14px; bottom: 0;
  width: 1px; background: var(--line);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  position: absolute; left: 0; top: 5px; width: 11px; height: 11px;
  border-radius: 50%; background: #fff; border: 2px solid var(--line-strong);
}
.tl-dot.tl-submit  { border-color: var(--primary); }
.tl-dot.tl-approve { border-color: var(--ok); background: var(--ok); }
.tl-dot.tl-reject  { border-color: var(--danger); background: var(--danger); }
.tl-dot.tl-cancel  { border-color: var(--muted); }
.tl-dot.tl-pending { border-color: var(--warn); border-style: dashed; animation: none; }
.tl-title { margin: 0; font-size: 13px; font-weight: 500; }
.tl-body { margin: 4px 0 0; font-size: 13px; color: #455066; line-height: 1.7; }
.tl-time { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

@media (max-width: 900px) {
  .req-layout { grid-template-columns: minmax(0, 1fr); }
}

/* 应用卡片上的「申请权限」小字 */
.tile-apply {
  font-size: 11px; color: var(--primary); text-decoration: none;
  margin-top: 6px; border-bottom: 1px solid currentColor; line-height: 1.4;
}
.tile-apply:hover { opacity: .75; }

/* ───── 审计日志 ───── */
.audit-filter {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px;
}
.audit-filter select, .audit-filter input[type=text] { width: auto; }
.audit-filter input[type=text] { flex: 1; min-width: 180px; max-width: 320px; }
.audit-filter input[type=date] { width: auto; }
.audit-tag { font-size: 11px; padding: 2px 8px; border-radius: 5px; white-space: nowrap; background: #f2f3f5; color: #5b6472; }
.ac-登录 { background: #eef3ff; color: #2b5bd7; }
.ac-安全 { background: #f3ecff; color: #6b3fd1; }
.ac-账号 { background: #e9f7f1; color: #1a7f5a; }
.ac-应用 { background: #fff4e5; color: #a4620a; }
.ac-横幅 { background: #fdeef6; color: #a52a6b; }
.ac-审批 { background: #e8f5ff; color: #16618f; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 20px; }
.pager a { text-decoration: none; }

/* ───── 人事档案 / 个人信息 ───── */
.person-layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px; align-items: start;
}
.person-layout > aside { display: flex; flex-direction: column; gap: 18px; }
.person-layout .card + .card { margin-top: 0; }
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px;
}
.form-grid .field { margin-bottom: 14px; }
.avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; }
.avatar-ph {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.avatar-lg { width: 84px; height: 84px; font-size: 30px; margin: 0 auto; }
.avatar-img.avatar-lg { border-radius: 50%; }

@media (max-width: 900px) {
  .person-layout { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}

/* ───── 全高侧栏（应用中心 / BPM 共用，风格对齐后台）───── */
.side-page {
  display: flex; width: 100%; min-height: calc(100vh - 58px); align-items: stretch;
}
.side-nav {
  width: 210px; flex: 0 0 210px; background: var(--card);
  border-right: 1px solid var(--line); padding: 18px 12px;
}
.side-nav .side-group { font-size: 11px; color: var(--muted); padding: 8px 12px 6px; }
.side-nav a.side-link { text-decoration: none; }
.side-nav a.side-link.with-n { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.side-nav a.side-link .n { font-size: 11px; color: var(--muted); }
.side-nav a.side-link.on .n { color: var(--primary); }
.side-page-main { flex: 1; min-width: 0; padding: var(--pad-top) var(--pad) 48px; }
.apps-cat { scroll-margin-top: 20px; }

@media (max-width: 900px) {
  .side-page { flex-direction: column; min-height: 0; }
  .side-nav {
    width: 100%; flex: none; border-right: none; border-bottom: 1px solid var(--line);
    display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px;
  }
  .side-nav .side-group { display: none; }
  .side-nav a.side-link { white-space: nowrap; margin: 0; }
  .side-nav a.side-link.with-n { gap: 6px; }
  .side-page-main { padding: 16px var(--pad) 40px; }
}

/* 固定应用的小标签 */
.tile-pin {
  position: absolute; top: 8px; right: 8px;
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
}

/* 顶栏头像链接 */
.who-link { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.who-link:hover .who { color: var(--primary); }

/* BPM 页面标题条 */
.bpm-head { margin-bottom: 16px; }
.bpm-head h1 { font-size: 19px; font-weight: 500; margin: 0 0 4px; }
.bpm-head p { font-size: 13px; color: var(--muted); margin: 0; }

/* 申请管理权限的醒目标记 */
.role-flag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; white-space: nowrap;
}

/* 图标支持上传图片：图片铺满图标方块，自动裁成同形状 */
.app-icon { overflow: hidden; }
.app-icon img {
  width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit;
}

/* 应用编辑页：图标编辑区与颜色色板 */
.icon-editor { display: flex; gap: 14px; align-items: flex-start; }
.icon-swatches { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.swatch-opt {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer; margin: 0;
}
.swatch-opt input { width: auto; margin: 0; }
.swatch {
  width: 22px; height: 22px; border-radius: 6px; display: inline-block;
  border: 1px solid rgba(0,0,0,.08); font-size: 11px; line-height: 22px; text-align: center; color: #403e3a;
}
.swatch-auto { background: #f2f3f5; }

/* ───── 首页卡片：固定大小，字多也不拉伸 ───── */
.app-card {
  min-width: 0; height: 128px; justify-content: center;
}
.app-card .app-name,
.app-card .app-desc {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-card .app-desc { min-height: 0; }

/* ───── 应用管理：横版卡片（左图标 / 右名称+描述），固定大小 ───── */
.apps-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px;
}
.app-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid #eef0f3; border-radius: 12px;
  padding: 14px 14px; height: 84px; min-width: 0;
  color: var(--text); text-decoration: none;
  transition: box-shadow .15s, border-color .15s;
  position: relative;
}
.app-row:hover { border-color: #e3e6eb; box-shadow: 0 4px 14px rgba(23,35,61,.08); }
.app-row .app-icon { flex: none; margin-bottom: 0; }
.app-row .row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.app-row .app-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-row .app-desc {
  display: block; margin-top: 3px; min-height: 0; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-row .row-foot { position: absolute; right: 10px; bottom: 8px; display: flex; gap: 6px; }

/* ───── 顶栏右上角：悬停姓名出下拉菜单 ───── */
.user-menu { position: relative; display: flex; align-items: center; }
.user-menu-name {
  display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  padding: 6px 8px; border-radius: 8px;
}
.user-menu-name:hover { background: #f2f3f5; }
.user-caret { font-size: 10px; color: var(--muted); }
.user-drop {
  display: none; position: absolute; right: 0; top: 100%;
  min-width: 140px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(23,35,61,.12); padding: 6px; z-index: 60;
  /* 桥接悬停间隙，鼠标从姓名移到菜单不会中断 */
  margin-top: 0;
}
.user-menu-name::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px;
}
.user-menu:hover .user-drop, .user-drop:hover { display: block; }
.user-drop form { margin: 0; }
.user-drop button {
  display: block; width: 100%; text-align: left; padding: 9px 12px;
  background: none; border: none; border-radius: 7px; cursor: pointer;
  font-size: 13px; color: var(--text); font-family: inherit;
}
.user-drop button:hover { background: var(--danger-soft); color: var(--danger); }

.tl-dot.tl-revoke { border-color: #d97706; background: #fbbf24; }

/* ───── 首页横幅：翻页箭头与可点页码 ───── */
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.28); color: #fff;
  font-size: 22px; line-height: 34px; text-align: center;
  cursor: pointer; z-index: 5; padding: 0;
  opacity: .55; transition: opacity .15s, background .15s;
}
.hero-arrow:hover { opacity: 1; background: rgba(0,0,0,.45); }
.hero-arrow-left { left: 14px; }
.hero-arrow-right { right: 14px; }
.hero-dot {
  width: 7px; height: 7px; border: none; padding: 0;
  border-radius: 50%; background: rgba(255,255,255,.45);
  cursor: pointer; transition: background .15s, transform .15s;
}
.hero-dot.on { background: #fff; transform: scale(1.25); }
.hero-dot:hover { background: rgba(255,255,255,.8); }

.badge-warn { background: #fff4e5; color: #b45309; }

/* ───── 后台侧栏固定：右侧内容滚动时左侧不动 ───── */
.admin-side {
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d5d9e0 transparent;
}
.admin-side::-webkit-scrollbar { width: 6px; }
.admin-side::-webkit-scrollbar-thumb { background: #d5d9e0; border-radius: 3px; }

@media (max-width: 720px) {
  .admin-side { position: static; height: auto; overflow: visible; }
}

/* 应用卡片：徽标与描述同一行，文字自动省略，不再被盖住 */
.app-row .row-sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; min-width: 0; }
.app-row .row-sub .app-desc { flex: 1; min-width: 0; margin-top: 0; }
.app-row .row-foot { position: static; right: auto; bottom: auto; }
.tile-vis.inline { margin-top: 0; flex: none; font-size: 10.5px; padding: 1px 8px; }
.tile-apply.inline {
  margin-top: 0; flex: none; border-bottom: none;
  background: var(--primary-soft); color: var(--primary);
  font-size: 10.5px; padding: 1px 8px; border-radius: 999px;
}
.tile-apply.inline:hover { background: #dbe8fd; opacity: 1; }

/* ═════════ 登录页：浅蓝科技风 ═════════ */
.lg-page {
  position: relative; min-height: 100vh; width: 100%; overflow: hidden;
  background: linear-gradient(150deg, #e7f1ff 0%, #f6fbff 46%, #deedff 100%);
  display: flex; flex-direction: column;
}
.lg-glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.lg-glow-a { width: 620px; height: 620px; left: -180px; top: -220px; background: rgba(140, 186, 255, .55); }
.lg-glow-b { width: 560px; height: 560px; right: -160px; bottom: -200px; background: rgba(168, 148, 250, .32); }
.lg-band {
  position: absolute; left: -10%; right: -10%; top: 42%; height: 1px; transform: rotate(-8deg);
  background: linear-gradient(90deg, transparent, rgba(120, 165, 255, .45), transparent);
  box-shadow: 0 0 24px rgba(120, 165, 255, .35);
  pointer-events: none;
}
.lg-brand {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 28px 0 0 44px;
}
.lg-logo { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.lg-logo img { width: 100%; height: 100%; object-fit: contain; }
.lg-brand-name { font-size: 15px; font-weight: 600; color: #1b3a6b; letter-spacing: .3px; }

.lg-main {
  position: relative; z-index: 2; flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 34px;
  padding: 4px 52px 44px;
}
.lg-left { flex: 1 1 0; max-width: 660px; }
.lg-left h1 {
  font-size: 44px; line-height: 1.22; font-weight: 700; margin: 0 0 12px;
  color: #123a6e; letter-spacing: 1px;
}
.lg-left h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #3f6cf7, #8a5cf5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lg-tagline { font-size: 14px; color: #5a6b86; margin: 0 0 8px; letter-spacing: .4px; }
.lg-art { width: 100%; max-width: 630px; height: auto; margin: -4px 0 0 -8px; }

.lg-right { flex: 0 0 400px; display: flex; justify-content: center; }
.lg-card {
  width: 100%; max-width: 400px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px; padding: 36px 34px 28px;
  box-shadow: 0 30px 70px rgba(24, 58, 122, .13), 0 4px 14px rgba(24, 58, 122, .05);
}
.lg-card h2 { font-size: 22px; font-weight: 600; color: #12305c; margin: 0 0 6px; text-align: center; letter-spacing: .5px; }
.lg-sub { font-size: 12.5px; color: #7d8aa3; text-align: center; margin: 0 0 26px; }

.lg-field { margin-bottom: 14px; }
.lg-field input {
  width: 100%; height: 46px; border-radius: 11px; padding: 0 15px;
  border: 1px solid #e3ecfa; background: #f6f9fe;
  font-size: 14px; color: #1c2b45; font-family: inherit;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.lg-field input::placeholder { color: #9aa8bf; }
.lg-field input:focus {
  outline: none; background: #fff; border-color: #6f94ff;
  box-shadow: 0 0 0 4px rgba(90, 130, 255, .12);
}

.lg-submit {
  width: 100%; height: 46px; margin-top: 8px;
  border: none; border-radius: 11px; cursor: pointer;
  background: linear-gradient(90deg, #3f6cf7, #7a5cf0);
  color: #fff; font-size: 15px; font-weight: 500; letter-spacing: 2px; font-family: inherit;
  box-shadow: 0 10px 24px rgba(79, 108, 240, .32);
  transition: transform .14s, box-shadow .14s, filter .14s;
}
.lg-submit:hover { filter: brightness(1.05); box-shadow: 0 14px 30px rgba(79, 108, 240, .38); }
.lg-submit:active { transform: translateY(1px); }

.lg-links {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; font-size: 12.5px; color: #8b97ad;
}
.lg-links a { color: #3f6cf7; text-decoration: none; }
.lg-links a:hover { text-decoration: underline; }
.lg-foot {
  margin: 22px 0 0; padding-top: 16px; border-top: 1px solid #eef3fb;
  text-align: center; font-size: 11.5px; color: #a3b0c4;
}
.lg-card .alert { margin: 0 0 16px; }

@media (max-width: 1180px) {
  .lg-art { max-width: 520px; }
  .lg-left h1 { font-size: 38px; }
}
@media (max-width: 980px) {
  .lg-main { flex-direction: column; gap: 28px; padding: 20px 24px 40px; }
  .lg-left { max-width: 100%; text-align: center; }
  .lg-left h1 { font-size: 30px; }
  .lg-art { max-width: 340px; }
  .lg-brand { padding: 20px 0 0 24px; }
}
@media (max-width: 560px) {
  .lg-left { display: none; }
  .lg-right { flex: 1 1 auto; }
  .lg-card { padding: 28px 20px 22px; border-radius: 18px; }
}

/* 登录家族共用：小字提示、复选框、幽灵按钮、验证码、折叠区 */
.lg-hint { font-size: 12px; color: #8695ad; line-height: 1.7; margin: 6px 0 0; }
.lg-note {
  font-size: 12.5px; color: #5d6c85; line-height: 1.75;
  background: #f4f8ff; border: 1px solid #e2ecfb; border-radius: 11px;
  padding: 12px 14px; margin: 0 0 18px;
}
.lg-check {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 12.5px; color: #6b7a94; font-weight: 400;
  margin: 2px 0 16px; cursor: pointer; line-height: 1.5;
}
.lg-check input[type="checkbox"] { width: 15px; height: 15px; margin: 1px 0 0; accent-color: #4f6cf0; flex: none; }
.lg-code { font-size: 22px !important; letter-spacing: 8px; text-align: center; font-family: ui-monospace, Consolas, monospace; }
.lg-submit-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.lg-btn-ghost {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 44px; margin-top: 10px;
  border: 1px solid #dbe6f8; border-radius: 11px; background: #fff;
  color: #3f5d94; font-size: 14px; font-family: inherit; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.lg-btn-ghost:hover { border-color: #a9c2ee; color: #2b4d8f; background: #f8fbff; }
.lg-details { margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef3fb; }
.lg-details summary { cursor: pointer; font-size: 12.5px; color: #7f8da5; list-style: none; }
.lg-details summary::-webkit-details-marker { display: none; }
.lg-details summary::before { content: '＋ '; color: #3f6cf7; }
.lg-details[open] summary::before { content: '－ '; }
.lg-details form { margin: 0; }
.lg-details .lg-btn-ghost { margin-top: 0; }

/* ═════════ 登录页插画：动态效果 ═════════ */
.lg-art g, .lg-art ellipse, .lg-art rect, .lg-art circle { transform-box: fill-box; }

/* 主卡片：缓慢上下浮动 */
.art-main { animation: artFloat 6.5s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes artFloat {
  0%, 100% { transform: translate(152px, 66px) translateY(0); }
  50%      { transform: translate(152px, 66px) translateY(-9px); }
}

/* 后层两张卡片：轻微错峰摆动 */
.art-back-1 { animation: artSway1 7.5s ease-in-out infinite; transform-origin: center; }
@keyframes artSway1 {
  0%, 100% { transform: translate(186px, 84px) rotate(7deg); }
  50%      { transform: translate(186px, 88px) rotate(9.5deg); }
}
.art-back-2 { animation: artSway2 9s ease-in-out infinite; transform-origin: center; }
@keyframes artSway2 {
  0%, 100% { transform: translate(168px, 96px) rotate(-9deg); }
  50%      { transform: translate(166px, 99px) rotate(-6.5deg); }
}

/* 卡片上的扫描光带：像身份验证时扫过一遍 */
.art-scan { animation: artScan 4.2s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes artScan {
  0%        { transform: translateY(0); opacity: 0; }
  10%       { opacity: .95; }
  62%       { opacity: .95; }
  74%, 100% { transform: translateY(168px); opacity: 0; }
}

/* 两条弧线：光点沿线流动 */
.art-orbit { stroke-dasharray: 7 19; animation: artDash 3.6s linear infinite; }
.art-orbit-2 { stroke-dasharray: 5 23; animation-duration: 5.4s; animation-direction: reverse; }
@keyframes artDash { to { stroke-dashoffset: -52; } }

/* 底座光环：呼吸 */
.art-halo { animation: artHalo 6s ease-in-out infinite; transform-origin: center; }
.art-halo-b { animation-delay: -2.4s; }
@keyframes artHalo {
  0%, 100% { transform: scale(1); opacity: .55; }
  50%      { transform: scale(1.05); opacity: .38; }
}
.art-glowpulse { animation: artGlow 5.2s ease-in-out infinite; transform-origin: center; }
@keyframes artGlow {
  0%, 100% { transform: scale(1); opacity: .45; }
  50%      { transform: scale(1.08); opacity: .85; }
}

/* 上升粒子 */
.art-particles circle { animation: artRise 5.6s ease-in-out infinite; }
.art-p1 { animation-delay: 0s; }
.art-p2 { animation-delay: -1.6s; animation-duration: 6.4s; }
.art-p3 { animation-delay: -3.1s; animation-duration: 5s; }
.art-p4 { animation-delay: -4.2s; animation-duration: 7s; }
@keyframes artRise {
  0%   { transform: translateY(0); opacity: 0; }
  18%  { opacity: .85; }
  70%  { opacity: 0; }
  100% { transform: translateY(-52px); opacity: 0; }
}

/* 漂浮光点：明暗呼吸 */
.art-dot-1, .art-dot-2, .art-dot-3 { animation: artBlink 4.4s ease-in-out infinite; transform-origin: center; }
.art-dot-1b { animation-delay: -1.2s; }
.art-dot-2  { animation-delay: -.6s; }
.art-dot-2b { animation-delay: -2.8s; }
.art-dot-3  { animation-delay: -2s; }
.art-dot-3b { animation-delay: -3.4s; }
@keyframes artBlink {
  0%, 100% { transform: scale(1) translateY(0); opacity: .85; }
  50%      { transform: scale(.82) translateY(-3px); opacity: .4; }
}

/* 系统开了「减少动态效果」就全部停下 */
@media (prefers-reduced-motion: reduce) {
  .lg-art * { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   全局浅蓝主题（与登录页统一）
   —— 只覆盖颜色/圆角/阴影，不改任何尺寸布局。
   —— 如需整体回退：删除本段即可恢复原灰白配色。
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #eef4fd;
  --card: #ffffff;
  --line: #e3ecf8;
  --line-strong: #cfdcf0;
  --text: #16283f;
  --muted: #74869f;
  --primary: #3d6cf5;
  --primary-soft: #eaf1ff;
  --radius: 14px;
}

body {
  background: linear-gradient(152deg, #e9f2ff 0%, #f8fbff 44%, #e6f0ff 100%);
  background-attachment: fixed;
}

/* 卡片：半透明 + 磨砂 */
.card, .panel {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 14px 36px rgba(30, 60, 120, .07);
}

/* 主按钮：蓝紫渐变 */
.btn {
  background: linear-gradient(90deg, #3f6cf7, #6f5cf0);
  border: none; border-radius: 10px; padding: 8px 18px;
  box-shadow: 0 6px 16px rgba(79, 108, 240, .24);
  transition: filter .14s, box-shadow .14s, transform .14s;
}
.btn:hover { opacity: 1; filter: brightness(1.06); box-shadow: 0 10px 22px rgba(79, 108, 240, .3); }
.btn:active { transform: translateY(1px); }

.btn-ghost {
  background: rgba(255, 255, 255, .9); border-color: #dbe6f8;
  border-radius: 10px; color: #3f5d94;
}
.btn-ghost:hover { border-color: #a9c2ee; color: #2b4d8f; background: #fff; }

/* 顶栏：保持上一版（不套浅蓝主题，避免透明度与导航高亮变化） */

.admin-side {
  background: rgba(255, 255, 255, .66);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
  border-right: 1px solid rgba(120, 150, 210, .12);
}
.side-link { color: #2a3d57; }
.side-link:hover { background: rgba(255, 255, 255, .85); }
.side-link.on { background: rgba(61, 108, 245, .12); color: var(--primary); font-weight: 500; }

/* 输入控件 */
input[type=text], input[type=password], input[type=email], select, textarea {
  background: #f6f9fe; border-color: #e3ecfa; border-radius: 10px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus,
select:focus, textarea:focus {
  background: #fff; border-color: #6f94ff;
  box-shadow: 0 0 0 4px rgba(90, 130, 255, .12);
}

/* 表格 */
th { background: rgba(244, 248, 255, .95); color: #5b6f8d; }
tbody tr:hover { background: rgba(244, 248, 255, .7); }

/* 页面标题 */
.page-title { color: #12305c; font-weight: 600; letter-spacing: .2px; }
.page-sub { color: #6d7f99; }

/* 应用卡片与列表行 */
.app-row {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(223, 234, 248, .9);
}
.app-row:hover { border-color: #cddcf3; box-shadow: 0 10px 26px rgba(30, 60, 120, .09); }
.app-card { background: rgba(255, 255, 255, .9); border-color: rgba(223, 234, 248, .9); }
.app-card:hover { box-shadow: 0 12px 28px rgba(30, 60, 120, .1); }

/* 横幅下的内容区留出呼吸感 */
.wrap, .admin-main { padding-bottom: 56px; }

/* 网络范围标记：内网 / 公网 */
.net-tag {
  flex: none; font-size: 10.5px; padding: 1px 8px; border-radius: 999px; white-space: nowrap;
}
.net-intranet { background: #fdf3e3; color: #b26a00; }
.net-public   { background: #eaf1ff; color: #3d6cf5; }
.net-badge {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  font-size: 10px; padding: 1px 7px; border-radius: 999px; line-height: 1.5;
  background: #fdf3e3; color: #b26a00;
}
.net-badge-in  { background: #fdf3e3; color: #b26a00; }
.net-badge-pub { background: #eaf1ff; color: #3d6cf5; }

/* 审计日志：来源标签 */
.client-kind {
  font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: #eef3fb; color: #3f5d94; white-space: nowrap;
}
