:root {
  /* 品牌色（公司 VI） */
  --brand: #ff3700;
  --brand-dark: #d92e00;
  --brand-light: #ff6446;
  --brand-bg: #fff2ee;
  /* 辅助色：看板上的图标和图表用它做区分。
     全站只有一个橙色会显得"素"，参考图那种观感靠的就是多色点缀。 */
  --c-blue: #2e90fa;
  --c-violet: #7c5cf0;
  --c-green: #12a15c;
  --c-amber: #ff8a00;
  --c-teal: #0fb5b5;
  --c-pink: #ef5da8;
  /* 中性色 */
  --bg: #f1f5fb;
  --card: #ffffff;
  --text: #1f2733;
  --muted: #8c8c8c;
  --border: #e6e6e6;
  --line: #f2efec;
  /* 语义色 */
  --ok: #1f9254;
  --warn: #ff7800;
  --danger: #b42318;
  --purple: #7c3aed;
  --sidebar: #ffffff;
  --radius: 12px;
  /* 毛玻璃卡：浅底上的白磨砂 */
  --glass: rgba(255, 255, 255, 0.72);
  --glass-line: rgba(255, 255, 255, 0.9);
  --shadow: 0 10px 30px rgba(31, 41, 71, 0.07);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; }

.hidden { display: none !important; }

/* ================================================================
   登录页
   背景是「品牌橙的日出山峦」—— 全部用 CSS 渐变 + SVG 画出来，
   不依赖任何图片素材，几 KB，任何屏幕都不糊。
   ================================================================ */
#login-view {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 40px 56px;
  background: linear-gradient(
    180deg,
    #150a05 0%,
    #33130a 26%,
    #6b2209 48%,
    #b8330b 66%,
    #ee4a12 82%,
    #ff7a45 100%
  );
}

/* 背景层 */
.lg-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.lg-bg .lg-glow {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 1500px;
  height: 1100px;
  transform: translate(-50%, -22%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 60, 0.30) 0%, rgba(255, 90, 30, 0) 62%);
}

/* 3D 玻璃装饰图（可选素材）。
   CSS 的 background-image 找不到文件时**什么都不渲染**，不会出现破图，
   所以这句可以一直摆着 —— 图片放进去就自动生效。
   z-index:1 让它盖住下面那几层（山峦 / 光斑）—— 有真素材时它就是主角。 */
.lg-bg .lg-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("../assets/login-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 装饰图没到位时的替身：几团大而柔的模糊光斑，做出玻璃的通透感 */
.lg-bg .lg-blob { position: absolute; border-radius: 50%; filter: blur(58px); }
.lg-bg .lg-blob.b1 {
  width: 620px; height: 620px; left: 32%; top: 2%;
  background: radial-gradient(circle, rgba(255, 168, 120, 0.55), rgba(255, 120, 60, 0) 68%);
}
.lg-bg .lg-blob.b2 {
  width: 430px; height: 430px; left: 56%; top: 40%;
  background: radial-gradient(circle, rgba(255, 214, 178, 0.42), rgba(255, 180, 120, 0) 70%);
}
.lg-bg .lg-blob.b3 {
  width: 540px; height: 540px; left: 20%; top: 50%;
  background: radial-gradient(circle, rgba(255, 96, 36, 0.40), rgba(255, 90, 30, 0) 70%);
}

.lg-bg .lg-mtn { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; display: block; }

/* 左侧压一层很淡的暗色：
   素材右半通常是亮的（玻璃高光），不压的话左边白色标题会"飘"。
   这层渐变到 56% 就没了，所以中间的玻璃主体不受影响。 */
.lg-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    96deg,
    rgba(28, 6, 0, 0.52) 0%,
    rgba(28, 6, 0, 0.24) 32%,
    rgba(28, 6, 0, 0) 56%
  );
}

/* 左侧内容 */
.lg-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 6px 0 2px;
}
.lg-brand img { height: 54px; display: block; }

/* 标题放在中偏上，三个卖点贴底 —— 上下两个 auto 把空白均分，
   视觉重心落在中间，不会全挤在底部 */
.lg-hero { margin-top: auto; padding-bottom: 30px; }
.lg-hero h1 {
  margin: 0 0 14px;
  font-size: 40px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
  line-height: 1.25;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}
.lg-hero p {
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 3px;
}
.lg-hero .lg-bar {
  display: block;
  width: 62px;
  height: 3px;
  margin-top: 20px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 0 0 16px rgba(255, 190, 150, 0.9);
}

/* 三个卖点 */
.lg-feats { display: flex; gap: 18px; padding-bottom: 6px; margin-top: auto; }
/* 三个卖点：用「暗玻璃」而不是「亮玻璃」。
   素材底部的颜色偏亮，亮玻璃卡上的白字会糊；暗玻璃卡不管压在什么底色上都清楚。 */
.lg-feats .lf {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(58, 16, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.lg-feats .lfi { width: 26px; height: 26px; flex-shrink: 0; color: #fff; opacity: 0.95; }
.lg-feats .lft b { display: block; color: #fff; font-size: 14.5px; font-weight: 700; letter-spacing: 1px; }
.lg-feats .lft span { display: block; color: rgba(255, 255, 255, 0.78); font-size: 12px; margin-top: 2px; }

/* 右侧登录卡：毛玻璃（半透明 + 背景模糊）。
   透一点橙光出来才有玻璃感，但又不能透太多 —— 0.9 是反复试过的平衡点：
   看得出是玻璃，同时输入框里的字依然很清楚。 */
.lg-card {
  position: relative;
  z-index: 3;
  width: 372px;
  /* 关键：max-width:100% 兜住，窄屏时卡片最多和容器一样宽，绝不溢出 */
  max-width: 100%;
  flex-shrink: 0;
  margin-left: 56px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  padding: 34px 34px 22px;
  box-shadow: 0 26px 70px rgba(40, 8, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.lg-card h2 { margin: 0 0 6px; font-size: 25px; font-weight: 800; color: var(--text); letter-spacing: 1px; }
.lg-card .lg-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 26px; letter-spacing: 0.5px; }

/* 输入框 */
.lg-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 13px;
  margin-bottom: 14px;
  background: #f5f7fa;
  border: 1px solid #e8ecf2;
  border-radius: 9px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.lg-field:focus-within {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 55, 0, 0.10);
}
.lg-field .lfi2 { width: 17px; height: 17px; flex-shrink: 0; color: #a8b0bc; }
.lg-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text);
}
.lg-field input::placeholder { color: #a8b0bc; }

.lg-eye {
  border: 0; background: transparent; padding: 4px; cursor: pointer; line-height: 0;
  color: #a8b0bc; border-radius: 5px;
}
.lg-eye:hover { color: var(--brand); }
.lg-eye svg { width: 17px; height: 17px; }

/* 验证码行 */
.lg-cap { display: flex; align-items: center; gap: 9px; }
.lg-cap .lg-field { flex: 1; min-width: 0; margin-bottom: 14px; }
.lg-capimg {
  width: 88px; height: 46px; flex-shrink: 0; margin-bottom: 14px;
  border: 1px solid #e8ecf2; border-radius: 9px; overflow: hidden;
  cursor: pointer; background: #f3f6fa; line-height: 0;
}
.lg-capimg svg { display: block; width: 100%; height: 100%; }
.lg-refresh {
  width: 30px; height: 30px; flex-shrink: 0; margin-bottom: 14px;
  border: 0; background: transparent; padding: 0; cursor: pointer;
  color: #a8b0bc; border-radius: 7px; line-height: 0;
  transition: color 0.15s, transform 0.35s;
}
.lg-refresh:hover { color: var(--brand); transform: rotate(180deg); }
.lg-refresh svg { width: 18px; height: 18px; }

.lg-error {
  margin: -2px 0 12px;
  padding: 9px 12px;
  background: #fef3f2;
  border: 1px solid #f7c9c5;
  border-radius: 8px;
  color: #b42318;
  font-size: 12.5px;
  line-height: 1.6;
}

/* 记住账号 + 忘记密码 */
.lg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 18px;
  font-size: 13px;
}
.lg-ck { display: flex; align-items: center; gap: 7px; cursor: pointer; color: #5a6577; user-select: none; }
.lg-ck input { position: absolute; opacity: 0; width: 0; height: 0; }
.lg-ck .lg-box {
  width: 15px; height: 15px; border: 1px solid #c8d0da; border-radius: 4px;
  position: relative; flex-shrink: 0; transition: background 0.15s, border-color 0.15s;
}
.lg-ck input:checked + .lg-box { background: var(--brand); border-color: var(--brand); }
.lg-ck input:checked + .lg-box::after {
  content: ''; position: absolute; left: 4.5px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.lg-row a { color: var(--brand); text-decoration: none; font-size: 13px; }
.lg-row a:hover { text-decoration: underline; }

/* 登录按钮 */
.lg-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 4px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 55, 0, 0.30);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.lg-btn:hover { background: var(--brand-dark); }
.lg-btn:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(255, 55, 0, 0.3); }
.lg-btn:disabled { opacity: 0.6; cursor: not-allowed; letter-spacing: 1px; }

.lg-tip {
  margin-top: 20px;
  padding: 11px 13px;
  background: #fff7f4;
  border: 1px solid #ffe0d6;
  border-radius: 9px;
  font-size: 11.5px;
  color: #8a4a34;
  line-height: 1.75;
}
.lg-tip code { background: #ffe7de; padding: 1px 5px; border-radius: 4px; font-weight: 700; color: #b42318; }

.lg-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f2f5f9;
  text-align: center;
  font-size: 11.5px;
  color: #a8b0bc;
  line-height: 1.8;
}
/* 备案号：管局要求网站首页要挂着、并且能点进工信部，别删 */
.lg-icp { color: #a8b0bc; text-decoration: none; border-bottom: 1px solid #dfe4ea; }
.lg-icp:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* 窄屏：藏掉左侧内容，登录卡居中 */
@media (max-width: 1180px) {
  #login-view { padding: 32px; }
  .lg-hero h1 { font-size: 32px; }
  .lg-card { margin-left: 32px; }
}
@media (max-width: 980px) {
  .lg-feats { display: none; }
}
@media (max-width: 860px) {
  #login-view { padding: 24px; align-items: center; justify-content: center; }
  .lg-inner { display: none; }
  .lg-card { margin-left: 0; width: 100%; max-width: 400px; padding: 30px 26px 20px; }
  .lg-card h2 { font-size: 22px; }
  .lg-capimg { width: 78px; }
}
@media (max-width: 400px) {
  #login-view { padding: 16px; }
  .lg-card { padding: 24px 20px 16px; }
  .lg-cap { gap: 6px; }
  .lg-capimg { width: 66px; }
  .lg-refresh { width: 26px; }
}

/* ================================================================
   首次登录强制改密码
   ================================================================ */
#pwd-view {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: linear-gradient(180deg, #150a05 0%, #33130a 30%, #7a2609 62%, #c9350b 100%);
}
.pw-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 16px;
  padding: 36px 36px 24px;
  box-shadow: 0 26px 70px rgba(40, 8, 0, 0.42);
}
.pw-card h2 { margin: 0 0 10px; font-size: 23px; font-weight: 800; color: var(--text); }
.pw-sub {
  font-size: 13px;
  color: #5a6577;
  line-height: 1.85;
  margin-bottom: 24px;
  padding: 11px 13px;
  background: #fff7f4;
  border: 1px solid #ffe0d6;
  border-radius: 9px;
}
.pw-sub code { background: #ffe7de; padding: 1px 6px; border-radius: 4px; font-weight: 700; color: #b42318; }
.pw-sub strong { color: #b42318; }
.pw-note { margin-top: 16px; font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.pw-note code { background: #f4f1ee; padding: 1px 5px; border-radius: 4px; color: #b42318; font-weight: 700; }
.pw-out {
  margin-top: 16px;
  width: 100%;
  padding: 9px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #faf8f6;
  color: #5a6577;
  font-size: 13px;
  cursor: pointer;
}
.pw-out:hover { background: #f5f7fa; color: var(--text); }

/* ---------------- 布局 ---------------- */
.layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* 页面级彩色光斑。
   这是毛玻璃能不能成立的关键：卡片是半透明白的，**背后得有颜色变化**，
   否则 blur 出来的还是一块白，看着就是普通白卡，没有那层"通透感"。
   参考图也是这么做的 —— 底色上铺几团大而柔的彩色，卡片浮在上面。 */
.app-aura { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.app-aura i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.app-aura i:nth-child(1) { width: 620px; height: 620px; left: -160px; top: -200px; background: #ffd9c7; }
.app-aura i:nth-child(2) { width: 520px; height: 520px; right: -140px; top: 40px; background: #d6e4ff; }
.app-aura i:nth-child(3) { width: 560px; height: 560px; left: 32%; bottom: -280px; background: #e6dbff; }
.app-aura i:nth-child(4) { width: 420px; height: 420px; right: 16%; bottom: -200px; background: #d2f2e6; }

.sidebar {
  width: 216px;
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-right: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.brand {
  padding: 18px 20px 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--line);
}
.brand small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); margin-top: 4px; letter-spacing: 0; }

.nav { padding: 12px 10px; flex: 1; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 9px; cursor: pointer; margin-bottom: 3px;
  font-size: 14px; color: #5a6577;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s; user-select: none;
}
.nav-item:hover { background: #faf8f6; color: var(--text); }
.nav-item.active {
  background: var(--brand-bg);
  color: var(--brand);
  font-weight: 700;
  border-left-color: var(--brand);
}
.nav-item .dot {
  background: var(--danger); color: #fff; border-radius: 9px; font-size: 11px;
  padding: 1px 6px; font-weight: 600;
}

.sidebar-foot { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 12.5px; }
.sidebar-foot .who { color: var(--text); font-weight: 600; }
.sidebar-foot .meta { color: var(--muted); margin-top: 3px; }
.sidebar-foot button {
  margin-top: 10px; width: 100%; padding: 7px; border-radius: 8px; cursor: pointer;
  background: #f5f7fa; color: #5a6577; border: 1px solid var(--border);
}
.sidebar-foot button:hover { background: var(--brand-bg); color: var(--brand); border-color: #ffd9ce; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 62px;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; flex-shrink: 0;
}
.topbar h2 { margin: 0; font-size: 17px; }
.topbar .actions { display: flex; gap: 10px; align-items: center; }

.content { padding: 22px 24px 40px; overflow: auto; flex: 1; }

/* ---------------- 通用组件 ---------------- */
/* 磨砂玻璃卡：半透明白 + 背景模糊，浮在彩色光斑上 */
.card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  border-radius: 18px;
  border: 1px solid var(--glass-line);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card-title { font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }

.btn {
  padding: 8px 15px; border-radius: 9px; border: 1px solid var(--border); background: #fff;
  color: var(--text); cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.btn:hover { border-color: #c3d0e4; background: #fafbfe; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.danger { color: var(--danger); border-color: #f7c9c5; }
.btn.danger:hover { background: #fef3f2; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover { filter: brightness(0.94); }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 7px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: #fff; color: var(--text); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43, 108, 255, 0.12); }
textarea { resize: vertical; min-height: 78px; line-height: 1.6; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; margin-bottom: 6px; color: #4b5f80; font-size: 13px; font-weight: 500; }
label.field > span em { color: var(--danger); font-style: normal; margin-left: 3px; }

.form-row { display: flex; gap: 14px; }
.form-row > * { flex: 1; min-width: 0; }

/* 统计卡片
   设计规矩：卡上只有「标签 + 大数字」。解释走 title 悬停提示，
   免得每张卡都挂一句副标题 —— 那样一屏 10 张卡就是 10 遍重复，全是文字。 */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  padding: 18px 20px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
}
.stat .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.stat .value { font-size: 30px; font-weight: 700; line-height: 1.05; letter-spacing: -0.5px; }
.stat .value small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 5px; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat.brand .value { color: var(--brand); }
.stat.ok .value { color: var(--ok); }
.stat.warn .value { color: var(--warn); }
.stat.danger .value { color: var(--danger); }
.stat.purple .value { color: var(--purple); }
/* 0 就别用彩色喊了，一排彩色的 0 比有数据还抢眼 */
.stat.stat-zero .value { color: #b9bec7; }

/* 彩色图标块：一眼分清这是哪一类指标。
   参考图里最显眼的就是这些小色块 —— 全站只有一个橙色会显得很素。 */
.stat-ic {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stat-ic svg { width: 15px; height: 15px; display: block; }
.tone-brand { background: #ffe9e2; color: var(--brand); }
.tone-blue { background: #e3efff; color: var(--c-blue); }
.tone-violet { background: #ece7ff; color: var(--c-violet); }
.tone-green { background: #def5e8; color: var(--c-green); }
.tone-amber { background: #fff0da; color: var(--c-amber); }
.tone-teal { background: #d9f4f4; color: var(--c-teal); }
.tone-pink { background: #ffe4f1; color: var(--c-pink); }
.tone-danger { background: #fee7e4; color: var(--danger); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 600; font-size: 12.5px;
  border-bottom: 1px solid var(--border); white-space: nowrap; background: #fafbfe;
}
th:first-child { border-top-left-radius: 9px; }
th:last-child { border-top-right-radius: 9px; }
td { padding: 11px 12px; border-bottom: 1px solid #f0f3f8; vertical-align: middle; }
tbody tr:hover { background: #fafbfe; }
td.nowrap, th.nowrap { white-space: nowrap; }
td.actions-cell { white-space: nowrap; }
td.actions-cell .btn { margin-right: 5px; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big { font-size: 32px; margin-bottom: 10px; opacity: 0.5; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.badge.gray { background: #eef1f6; color: #64748b; }
.badge.blue { background: #e7f0ff; color: var(--brand-dark); }
.badge.green { background: #e6f7ee; color: #0d7a48; }
.badge.orange { background: #fff3e3; color: #b45309; }
.badge.red { background: #feeceb; color: #b42318; }
.badge.purple { background: #f0ebff; color: #5b3fd6; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { width: auto; min-width: 150px; }
.toolbar .grow { flex: 1; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 13px; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(16, 26, 46, 0.5); display: flex;
  align-items: flex-start; justify-content: center; padding: 48px 16px; z-index: 100; overflow: auto;
}
.modal {
  background: var(--card); border-radius: 16px; width: 100%; max-width: 560px;
  box-shadow: 0 24px 60px rgba(10, 25, 60, 0.28); animation: pop 0.16s ease-out;
}
.modal.wide { max-width: 760px; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head .x { cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; background: none; border: none; }
.modal-head .x:hover { color: var(--text); }
.modal-body { padding: 20px 22px; max-height: 64vh; overflow: auto; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px;
}
.form-error {
  background: #fef3f2; color: #b42318; border: 1px solid #f7c9c5; padding: 9px 12px;
  border-radius: 8px; margin-bottom: 14px; font-size: 13px;
}

/* 详情块 */
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 9px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.section-title {
  font-weight: 600; margin: 20px 0 10px; padding-left: 9px; border-left: 3px solid var(--brand);
  font-size: 14px;
}
.section-title:first-child { margin-top: 0; }

.timeline { border-left: 2px solid var(--border); margin-left: 6px; padding-left: 16px; }
.timeline .item { position: relative; padding-bottom: 16px; }
.timeline .item:last-child { padding-bottom: 0; }
.timeline .item::before {
  content: ""; position: absolute; left: -22px; top: 5px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--brand);
}
.timeline .item .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.timeline .item .time { color: var(--muted); font-size: 12.5px; }
.timeline .item .body { color: #3c4a60; line-height: 1.65; font-size: 13.5px; }

.alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.alert.warn { background: #fff8ec; border: 1px solid #ffe0b2; color: #8a5a00; }
.alert.danger { background: #fef3f2; border: 1px solid #f7c9c5; color: #b42318; }
.alert.info { background: #fff7f4; border: 1px solid #ffe0d6; color: #8a4a34; }

/* 悬浮提示 */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border-radius: 10px; padding: 12px 18px; box-shadow: 0 8px 26px rgba(16, 26, 46, 0.16);
  border-left: 4px solid var(--brand); min-width: 220px; font-size: 13.5px; animation: pop 0.18s ease-out;
}
.toast.ok { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--danger); }

.loading { text-align: center; padding: 40px; color: var(--muted); }

/* ================= 组织树 ================= */
.org-tree { font-size: 14px; }
.org-node {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  border: 1px solid transparent; transition: background .15s;
}
.org-node:hover { background: #f7f9fd; border-color: var(--border); }
.org-node .caret { width: 16px; color: var(--muted); cursor: pointer; user-select: none; text-align: center; }
.org-node .caret.leaf { cursor: default; opacity: .25; }
.org-node .name { font-weight: 600; }
.org-node .meta { color: var(--muted); font-size: 12.5px; }
.org-node .spacer { flex: 1; }
.org-node .ops { opacity: 0; transition: opacity .15s; white-space: nowrap; }
.org-node:hover .ops { opacity: 1; }

/* ================= 客户进度流程图 ================= */
.progress-block { border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; margin-bottom: 12px; }
.progress-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.progress-head .pname { font-weight: 600; font-size: 15px; }
.progress-head .spacer { flex: 1; }

.steps { display: flex; align-items: flex-start; }
.step { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; width: 62px; }
.step .dot {
  width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 2px solid #d5dded;
  box-sizing: border-box; z-index: 1;
}
.step .dot.done { background: var(--brand); border-color: var(--brand); }
.step .dot.current { background: #fff; border-color: var(--brand); border-width: 4px; box-shadow: 0 0 0 4px rgba(43,108,255,.13); }
.step .dot.fail { background: var(--danger); border-color: var(--danger); }
.step .lbl { font-size: 11.5px; color: var(--muted); margin-top: 7px; white-space: nowrap; }
.step .lbl.on { color: var(--brand); font-weight: 600; }
.step .lbl.bad { color: var(--danger); font-weight: 600; }
.step-line { flex: 1; height: 2px; background: #e3e9f3; margin-top: 7px; min-width: 14px; }
.step-line.done { background: var(--brand); }
.steps-closed .step .dot.done { background: #b9c2d0; border-color: #b9c2d0; }
.steps-closed .step-line.done { background: #dfe4ec; }

/* ================= 节点流水时间线 ================= */
.flow-log { border-left: 2px solid var(--border); margin-left: 7px; padding-left: 18px; }
.flow-log .item { position: relative; padding-bottom: 16px; }
.flow-log .item:last-child { padding-bottom: 0; }
.flow-log .item::before {
  content: ""; position: absolute; left: -25px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px #fff;
}
.flow-log .item.rollback::before { background: var(--warn); }
.flow-log .item.terminate::before { background: var(--danger); }
.flow-log .item.settle::before { background: var(--ok); }
.flow-log .item.create::before { background: #94a3b8; }
.flow-log .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.flow-log .arrow { color: var(--muted); }
.flow-log .time { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.flow-log .body { color: #3c4a60; line-height: 1.65; font-size: 13px; }
.flow-log .remark {
  background: #f7f9fd; border-left: 3px solid #d5dded; padding: 6px 10px; border-radius: 0 6px 6px 0;
  margin-top: 6px; color: #4b5f80;
}

.sibling-card {
  border: 1px dashed #ffd7d3; background: #fffafa; border-radius: 9px;
  padding: 10px 13px; margin-bottom: 8px; font-size: 13px;
}

/* ================================================================
   客资管理：tab 条
   （2026-10 把「客户管理 / 报备管理 / 跟进记录 / 待跟进」四个一级菜单
     合并成了一个，靠这排 tab 切换。tab 条在 .content 外面，切 tab 不会被冲掉）
   ================================================================ */
.page-tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.page-tab {
  border: none;
  background: none;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.page-tab:hover { color: var(--text); }
.page-tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* ================================================================
   数据看板：顶部横幅（橙色渐变 + 玻璃控件）
   ================================================================ */
.hero-band {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 24px;
  margin-bottom: 22px;
  border-radius: 20px;
  color: var(--text);
  /* 浅色柔和渐变：橙 → 粉紫 → 蓝，参考图就是这个调子。
     之前做成深橙底是跑偏了 —— 那一版整体的"沉重感"就是从这来的。 */
  background: linear-gradient(115deg, #fff3ec 0%, #ffe6da 32%, #f4ecff 66%, #e8f1ff 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px rgba(31, 41, 71, 0.08);
}
/* 装饰图：素材是深橙底的，直接铺在浅色横幅上会脏。
   所以只取它右半边（那里本身是亮的），左边用渐变遮罩淡出，
   低透明度叠上去当"暖光"，而不是当主体。 */
.hb-art {
  position: absolute;
  inset: 0;
  background-image: url("../assets/hero-art.jpg");
  background-size: cover;
  background-position: right 45%;
  background-repeat: no-repeat;
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 52%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 52%, #000 100%);
  pointer-events: none;
}
/* 装饰图没到位时的替身：两团柔光 */
.hb-blob { position: absolute; border-radius: 50%; filter: blur(48px); pointer-events: none; }
.hb-blob.hb-b1 {
  width: 360px; height: 360px; right: -70px; top: -170px;
  background: radial-gradient(circle, rgba(255, 196, 158, 0.6), rgba(255, 150, 90, 0) 70%);
}
.hb-blob.hb-b2 {
  width: 300px; height: 300px; left: 20%; bottom: -180px;
  background: radial-gradient(circle, rgba(255, 96, 36, 0.55), rgba(255, 90, 30, 0) 70%);
}
.hb-left, .hb-right { position: relative; z-index: 2; }
.hb-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.hb-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hb-date { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; color: var(--text); }
.hb-line { font-size: 13px; color: #6b7280; margin-top: 5px; }

/* 签约率环形进度（conic-gradient 手绘，不引库） */
.hb-ring { text-align: center; flex-shrink: 0; }
.ring {
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  background: conic-gradient(var(--brand) calc(var(--p, 0) * 1%), rgba(255, 55, 0, 0.14) 0);
}
.ring::before {
  content: ''; position: absolute; inset: 7px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31, 41, 71, 0.08);
}
.ring span { position: relative; font-size: 15px; font-weight: 700; color: var(--brand); }
.ring-cap { font-size: 11.5px; color: #6b7280; margin-top: 6px; }

/* 横幅里的控件：浅底上用白色小片，别用半透明 —— 会糊 */
.hero-band .seg-group {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.hero-band .seg { color: #6b7280; }
.hero-band .seg.on { background: var(--brand); color: #fff; }
.hero-band .dash-date input {
  width: auto;
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(31, 41, 71, 0.1);
  color: var(--text);
  border-radius: 9px;
  padding: 7px 10px;
}
.hero-band .btn.sm { background: #fff; color: var(--brand); border: 1px solid #ffd9ce; font-weight: 600; }

/* 分段按钮（看板横幅和业绩排行切换共用） */
.seg-group { display: inline-flex; background: var(--bg); border-radius: 9px; padding: 3px; }
.seg {
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--muted);
}
.seg.on { background: var(--brand); color: #fff; font-weight: 600; }
.dash-date { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.dash-date input { width: auto; }

.section-hd {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  margin: 2px 0 12px 12px;
  position: relative;
}
/* 左边一小段品牌色竖条，代替「①②」这种编号 */
.section-hd::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 3px;
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--brand);
}
.section-hd .sh-note { font-size: 12.5px; font-weight: 400; color: var(--muted); }

/* 能点开的数字卡：不写字，靠 hover 表达「我能点」 */
.stat-link { cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
.stat-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 55, 0, .13);
  border-color: #ffcfc0;
}

/* ================================================================
   数据看板：节点流程图（卡片并排 + 箭头）
   ================================================================ */
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 6px 0 12px; }
.flow-node {
  min-width: 104px;
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: .12s;
}
.flow-node:hover { border-color: var(--brand); background: var(--brand-bg); }
.flow-node .fn-k { font-size: 12.5px; color: var(--muted); }
.flow-node .fn-v { font-size: 24px; font-weight: 700; color: var(--brand); line-height: 1.25; }
.flow-arrow { color: #c8c8c8; font-size: 20px; flex-shrink: 0; padding: 0 2px; }

.flow-exits { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.flow-exits-k { font-size: 12.5px; color: var(--muted); }
.flow-exit {
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  background: #faf8f6;
  border: 1px dashed var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}
.flow-exit:hover { border-color: var(--danger); color: var(--danger); }
.flow-exit strong { color: var(--danger); }

/* ================================================================
   柱状图（纯 CSS 竖条，不引图表库）
   flex 布局：柱子几个都能自动铺满整行宽度，不会像 SVG 那样挤在左边
   ================================================================ */
.bars { display: flex; gap: 8px; padding: 24px 2px 0; }
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.bar-plot { width: 100%; max-width: 44px; display: flex; flex-direction: column; justify-content: flex-end; }
.bar-fill {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, #ff7040 0%, #ff3700 100%);
  border-radius: 7px 7px 0 0;
  box-shadow: 0 3px 10px rgba(255, 55, 0, 0.18);
}
/* 数字贴着柱子顶端（跟着柱子走） */
.bar-num {
  position: absolute; left: 50%; top: -19px; transform: translateX(-50%);
  font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.bar-fill.ok { background: var(--ok); }
.bar-fill.warn { background: var(--warn); }
.bar-name {
  font-size: 11.5px; color: var(--muted); margin-top: 8px;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 全是 0 的时候不画空柱子，给一句话 */
.chart-empty {
  padding: 46px 20px;
  text-align: center;
  color: #b0aca8;
  font-size: 13px;
  background: #faf8f6;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

/* 卡片标题右侧的一组东西（说明文字 + 切换按钮） */
.ct-right { display: flex; align-items: center; gap: 12px; font-weight: 400; }
.ct-note { font-size: 13px; color: var(--muted); }
.seg-group.seg-sm { padding: 2px; }
.seg-sm .seg { padding: 4px 12px; font-size: 12.5px; }

/* ================================================================
   员工批量导入：粘贴框 + 预览
   ================================================================ */
.imp-ta {
  width: 100%;
  min-height: 150px;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre;
  overflow: auto;
}
.imp-actions { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; }
.imp-hint { font-size: 12.5px; color: var(--muted); }
.imp-sum { font-size: 13px; margin: 14px 0 10px; }
.imp-sum b { font-weight: 700; }
.imp-sum .ok { color: var(--ok); }
.imp-sum .bad { color: var(--danger); }
.imp-sum .warn { color: var(--warn); }

.imp-block {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  background: #fafbfd;
}
.imp-block.ok { border-color: #bfe6d0; background: #f5fcf8; }
.imp-block.bad { border-color: #f7c9c5; background: #fffafa; }
.imp-block.warn { border-color: #ffe0b2; background: #fffdf7; }
.imp-block-t { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.imp-block.bad .imp-block-t { color: var(--danger); }
.imp-block.warn .imp-block-t { color: #8a5a00; }
.imp-block.ok .imp-block-t { color: #14663a; }
.imp-table { font-size: 12.5px; }
.imp-table th { padding: 6px 10px; }
.imp-table td { padding: 6px 10px; }

@media (max-width: 860px) {
  .sidebar { width: 62px; }
  .brand span, .nav-item span:not(.icon), .sidebar-foot { display: none; }
  .brand { padding: 18px 0; text-align: center; font-size: 20px; }
  .nav-item { justify-content: center; padding: 12px 0; font-size: 18px; }
  .content { padding: 16px; }
  .form-row { display: block; }
}
