/* ============================================================
   AI 服务事业部管理后台 · 样式表
   ============================================================ */

:root {
  /* 侧边栏：中性近黑，比深蓝更沉稳 */
  --sb-bg: #101114;
  --sb-bg-soft: #1b1d21;
  --sb-text: #8a8f99;
  --sb-text-hi: #f4f5f7;

  --bg: #f6f7f9;
  --card: #ffffff;
  --line: #e9ebef;
  --line-soft: #f1f2f5;

  --text: #16181d;
  --text-2: #4c525c;
  --text-3: #8b919b;

  --primary: #2559d6;
  --primary-soft: #eff3ff;

  /* 墨色：主按钮 / 选中态，与侧边栏同一色系 */
  --ink: #1c1e23;
  --ink-hover: #0c0d10;
  --green: #0f9d6e;
  --red: #dc4a4a;
  --amber: #d98613;
  --violet: #7c5cd6;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 6px 20px -8px rgba(16, 24, 40, .16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 左侧固定深色，保证内容很长时侧边栏背景依然铺满 */
  background: linear-gradient(90deg, var(--sb-bg) 236px, var(--bg) 236px);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 细滚动条，避免系统默认的粗条破坏整体质感 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #d5d9e0;
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: #bcc2cc; background-clip: content-box; }

/* 侧边栏内的滚动条在深色底上要更淡 */
.sidebar ::-webkit-scrollbar-thumb { background: #3a3e46; background-clip: content-box; }
.sidebar ::-webkit-scrollbar-thumb:hover { background: #4c525c; background-clip: content-box; }

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
table { border-collapse: collapse; width: 100%; }

/* ---------------- 布局 ---------------- */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 236px;
  flex: 0 0 236px;
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f4f5f7;
  color: #101114;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .3px;
  display: grid;
  place-items: center;
}

.brand-text strong {
  display: block;
  color: var(--sb-text-hi);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .1px;
}

.brand-text span {
  display: block;
  color: #6a6f78;
  font-size: 10.5px;
  letter-spacing: 1.4px;
  margin-top: 2px;
}

.nav {
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  color: var(--sb-text);
  font-size: 13.5px;
  transition: background .15s, color .15s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--sb-text-hi);
}

.nav-item.active {
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

/* ---- 分组导航 ---- */

.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 11px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--sb-text);
  font-family: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.nav-group-head:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--sb-text-hi);
}

.nav-group-head.active {
  background: rgba(255, 255, 255, .04);
  color: var(--sb-text-hi);
}

.nav-arrow {
  display: inline-flex;
  margin-left: auto;
  color: #4d5158;
  transition: transform .22s ease;
}

.nav-group.collapsed .nav-arrow {
  transform: rotate(-90deg);
}

.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 2px 0 4px;
  padding-left: 16px;
  max-height: 240px;
  overflow: hidden;
  transition: max-height .24s ease, opacity .18s ease;
}

.nav-group.collapsed .nav-sub {
  max-height: 0;
  opacity: 0;
}

.nav-sub-item {
  position: relative;
  display: block;
  padding: 5px 11px 5px 14px;
  border-radius: var(--radius-sm);
  color: var(--sb-text);
  font-size: 12.5px;
  transition: background .15s, color .15s;
}

.nav-sub-item::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: #4b4f57;
  transition: background .15s;
}

.nav-sub-item:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--sb-text-hi);
}

.nav-sub-item.active {
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

.nav-sub-item.active::before {
  background: #fff;
}

.sidebar-foot {
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-foot .ver {
  color: #4a4e55;
  font-size: 11px;
  letter-spacing: .4px;
}

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

.topbar {
  height: 64px;
  flex: 0 0 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.1px;
}

.topbar-title p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-3);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #202329;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.user-info strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.user-info span {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.3;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  transition: background .15s, color .15s;
}

.icon-btn:hover {
  background: #f2f4f7;
  color: var(--text);
}

.content {
  padding: 26px 32px 56px;
  flex: 1;
}

/* ---------------- 通用卡片 ---------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.card-head h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-head .hint {
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 400;
}

.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

/* ---------------- 提示条 ---------------- */

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  border: 1px solid transparent;
}

.alert-success { background: #f1f8f5; color: #0b7d59; border-color: #d8ebe2; }
.alert-error   { background: #fdf3f3; color: #b23a3a; border-color: #f2dcdc; }
.alert-info    { background: var(--primary-soft); color: #1e4bbd; border-color: #dde6fb; }

/* ---------------- 筛选工具条 ---------------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}

.segmented a {
  padding: 5px 13px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-2);
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.segmented a:hover { background: #f4f5f8; }

.segmented a.active {
  background: var(--ink);
  color: #fff;
  font-weight: 500;
}

/* ---------------- 表单控件 ---------------- */

input[type="text"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  padding: 8px 11px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 89, 214, .1);
}

textarea { resize: vertical; min-height: 76px; }

/* 批量录入粘贴区：等宽字体便于列对齐 */
textarea.batch-area {
  font-family: ui-monospace, Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.9;
  tab-size: 4;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
}

.search-box {
  position: relative;
  min-width: 220px;
}

.search-box svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search-box input { padding-left: 34px; }

/* 表格复选框 */
input[type="checkbox"].cb {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: .01em;
}

.field label .req { color: var(--red); margin-left: 2px; }

.field .tip {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 5px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
}

.form-grid .full { grid-column: 1 / -1; }

/* 请假时间快捷选项 */
.dt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.dt-chip {
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  color: var(--text-2);
  background: #f7f8fa;
  border: 1px solid #e6e9ee;
  border-radius: 999px;
  padding: 6px 11px;
  cursor: pointer;
  transition: all .15s;
}

.dt-chip:hover {
  color: var(--primary);
  border-color: #bfd4f8;
  background: var(--primary-soft);
}

.dt-chip:active { transform: translateY(1px); }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  white-space: nowrap;
  line-height: 1.5;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .14);
}

.btn-primary:hover { background: var(--ink-hover); }

.btn-ghost {
  background: #fff;
  border-color: #e2e6ec;
  color: var(--text-2);
}

.btn-ghost:hover { background: #f7f8fa; border-color: #d4dae3; color: var(--text); }

.btn-danger { background: #fdf2f2; color: #b23a3a; border-color: #f3d6d6; }
.btn-danger:hover { background: #fbe8e8; }

.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 7px; }

.btn-link {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 5px;
  font-family: inherit;
  transition: background .15s, color .15s;
}

.btn-link:hover { background: #f1f2f5; color: var(--text); }

/* 行内主操作：比同排的次要操作略重，但仍不用色 */
.btn-link.strong { color: var(--text); font-weight: 500; }
.btn-link.strong:hover { background: #eef0f3; }
.btn-link.danger { color: var(--red); }
.btn-link.danger:hover { background: #fdf1f1; }

/* ---------------- 统计卡片 ---------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat-label {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .01em;
}

.stat-value {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1.1px;
  margin-top: 9px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-value .unit {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  margin-left: 4px;
  letter-spacing: 0;
}

.stat-foot {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 7px;
  position: relative;
  z-index: 1;
}

.stat-foot .up { color: var(--red); font-weight: 500; }
.stat-foot .down { color: var(--green); font-weight: 500; }

/* ---------------- 两栏 / 三栏 ---------------- */

.grid-2 {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  align-items: start;
}

.grid-2 > .card { margin-bottom: 0; }

/* 网格子项默认 min-width:auto，会被内部宽表格撑破容器，窄屏必须归零 */
.grid-2 > * { min-width: 0; }

.col-stack { min-width: 0; }

.col-stack > .card:last-child { margin-bottom: 0; }

/* ---------------- 表格 ---------------- */

.table-wrap { overflow-x: auto; }

.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .04em;
  padding: 11px 16px;
  background: transparent;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--text-2);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfc; }

.card-body.tight .table th:first-child,
.card-body.tight .table td:first-child { padding-left: 20px; }

.card-body.tight .table th:last-child,
.card-body.tight .table td:last-child { padding-right: 20px; }

.table .num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.table .strong { color: var(--text); font-weight: 500; }
.table .muted { color: var(--text-3); font-size: 12.5px; }
.table .nowrap { white-space: nowrap; }

.cell-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-person .avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 500;
  color: #4c525c;
  background: #f1f3f6;
  flex: 0 0 30px;
}

.cell-person .p-name { color: var(--text); font-weight: 500; line-height: 1.3; }
.cell-person .p-sub { color: var(--text-3); font-size: 11.5px; line-height: 1.3; }

/* ---------------- 徽标 ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.65;
}

.badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge-approved { background: #edf7f2; color: #0b7d59; }
.badge-pending  { background: #fdf6e9; color: #a76508; }
.badge-rejected { background: #fdf1f1; color: #b23a3a; }

.type-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
}

.type-tag i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: inline-block;
  flex: 0 0 7px;
}

/* ---------------- 图表：环形 ---------------- */

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.donut {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  position: relative;
  flex: 0 0 168px;
  display: grid;
  place-items: center;
}

.donut::before {
  content: "";
  position: absolute;
  inset: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .06) inset;
}

.donut-center {
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.25;
}

.donut-center strong {
  display: block;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}

.donut-center span {
  font-size: 11.5px;
  color: var(--text-3);
}

.legend {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}

.legend-item i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: 0 0 9px;
}

.legend-item .l-name { color: var(--text-2); flex: 1; }

.legend-item .l-val {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.legend-item .l-pct {
  color: var(--text-3);
  font-size: 11.5px;
  width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 图表：柱状 ---------------- */

.vchart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 190px;
  padding-top: 12px;
  border-bottom: 1px solid var(--line);
}

.vbar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
  min-width: 0;
}

.vbar-val {
  font-size: 11.5px;
  color: var(--text-2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity .15s;
}

.vbar-col:hover .vbar-val { opacity: 1; }

.vbar {
  width: 100%;
  max-width: 44px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #4a78e0, #2559d6);
  min-height: 3px;
  transition: filter .15s;
  position: relative;
}

.vbar.peak { background: linear-gradient(180deg, #f59e0b, #d97706); }

/* 当月无数据：保留一条淡淡的基线，避免出现一串蓝色短线 */
.vbar.zero { background: #e8eef6; }

.vbar-col:hover .vbar { filter: brightness(1.1); }

.vchart-labels {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.vchart-labels span {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-3);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

/* ---------------- 横向排行 ---------------- */

.rank-list { display: flex; flex-direction: column; gap: 15px; }

/* 排行双列（人数较多时） */
.rank-list.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 44px;
}

.rank-item { display: flex; flex-direction: column; gap: 6px; }

.rank-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.rank-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
}

.rank-idx {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  background: #f2f4f7;
  color: var(--text-3);
  flex: 0 0 19px;
}

.rank-item:nth-child(1) .rank-idx { background: #fef3c7; color: #b45309; }
.rank-item:nth-child(2) .rank-idx { background: #e6e9ee; color: #5a6069; }
.rank-item:nth-child(3) .rank-idx { background: #ffedd5; color: #c2410c; }

.rank-sub { color: var(--text-3); font-size: 11.5px; }

.rank-val {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rank-val small { color: var(--text-3); font-weight: 400; margin-left: 3px; font-size: 11.5px; }

.rank-track {
  height: 6px;
  border-radius: 4px;
  background: #f2f4f7;
  overflow: hidden;
}

.rank-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--primary);
}

/* ---------------- 弹窗 ---------------- */
[hidden] { display: none !important; }

dialog.modal {
  width: min(430px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  box-shadow: 0 28px 64px -24px rgba(16, 24, 40, .4);
}

dialog.modal::backdrop {
  background: rgba(16, 24, 40, .52);
}

/* 金额输入不需要浏览器自带的上下箭头，弹窗里显得挤 */
dialog.modal input[type="number"]::-webkit-outer-spin-button,
dialog.modal input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

dialog.modal input[type="number"] { -moz-appearance: textfield; }

.modal-head {
  padding: 20px 22px 0;
}

.modal-head h3 {
  font-size: 15px;
  letter-spacing: -.1px;
}

.modal-head p {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
}

.modal-body {
  padding: 16px 22px 2px;
}

.modal-body .field label { margin-bottom: 6px; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 22px 20px;
}

/* ---------------- 空状态 ---------------- */

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--text-3);
}

.empty svg { color: #d2d7de; margin-bottom: 10px; }
.empty p { margin: 0; font-size: 13.5px; }

/* ---------------- 分页 ---------------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.page-info { font-size: 12.5px; color: var(--text-3); }

.page-links { display: flex; gap: 5px; }

.page-links a,
.page-links span {
  min-width: 31px;
  height: 31px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  color: var(--text-2);
  background: #fff;
  font-variant-numeric: tabular-nums;
}

.page-links a:hover { border-color: #d2d7de; background: #f7f8fa; }

.page-links .current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 500;
}

.page-links .disabled { color: #d2d7de; background: #fafbfc; }

/* ---------------- 详情 / 表单页 ---------------- */

.page-narrow {
  max-width: 940px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 14px;
  padding: 4px 8px 4px 2px;
  border-radius: 7px;
}

.back-link:hover { color: var(--primary); background: var(--primary-soft); }

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  margin-top: 6px;
}

/* ---------------- 登录页 ---------------- */

/* ============================================================
   登录页 · AI 核心
   左：粒子聚成的「AI」字形 + 文案；右：深色玻璃登录卡
   ============================================================ */

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 5vw;
  background: #05070c;
  color: #e8eefb;
  overflow: hidden;
  isolation: isolate;
}

/* ---------- 背景层 ---------- */

.ai-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ai-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* 极光雾团：只动 transform，交给合成层 */
.ai-orb {
  position: absolute;
  border-radius: 50%;
  opacity: .5;
  will-change: transform;
  transform: translateZ(0);
}

.ai-orb-1 {
  width: 48vw;
  height: 48vw;
  left: -13vw;
  top: -19vw;
  background: radial-gradient(circle, rgba(28, 96, 255, .52), rgba(28, 96, 255, 0) 68%);
  animation: ai-orb-1 27s ease-in-out infinite alternate;
}

.ai-orb-2 {
  width: 44vw;
  height: 44vw;
  right: -12vw;
  top: 2vh;
  background: radial-gradient(circle, rgba(124, 58, 237, .46), rgba(124, 58, 237, 0) 68%);
  animation: ai-orb-2 33s ease-in-out infinite alternate;
}

.ai-orb-3 {
  width: 54vw;
  height: 38vw;
  left: 16vw;
  bottom: -26vw;
  background: radial-gradient(circle, rgba(6, 182, 212, .34), rgba(6, 182, 212, 0) 70%);
  animation: ai-orb-3 24s ease-in-out infinite alternate;
}

@keyframes ai-orb-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(7vw, 5vh, 0) scale(1.12); }
}

@keyframes ai-orb-2 {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(-6vw, 6vh, 0) scale(.92); }
}

@keyframes ai-orb-3 {
  from { transform: translate3d(0, 0, 0) scale(.95); }
  to   { transform: translate3d(4vw, -5vh, 0) scale(1.1); }
}

/* 细网格：中间清晰、四周淡出，给粒子场一点纵深 */
.ai-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(to right, rgba(120, 170, 255, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 170, 255, .07) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 38% 46%, #000 0%, rgba(0, 0, 0, .5) 46%, transparent 78%);
  mask-image: radial-gradient(circle at 38% 46%, #000 0%, rgba(0, 0, 0, .5) 46%, transparent 78%);
}

/* 暗角压边，把视线收到中间 */
.ai-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 48%, transparent 30%, rgba(2, 4, 8, .55) 92%),
    linear-gradient(to bottom, rgba(2, 4, 8, .5), transparent 20%, transparent 80%, rgba(2, 4, 8, .55));
}

/* ---------- 两栏舞台 ---------- */

.login-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 404px;
  align-items: center;
  gap: clamp(30px, 4.6vw, 72px);
}

/* ---------- 左侧：AI 字形与文案 ---------- */

.login-art { min-width: 0; }

.art-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 27px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(120, 165, 255, .2);
  background: rgba(46, 96, 220, .12);
  color: #8fb0f0;
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.art-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4fd1ff;
  box-shadow: 0 0 10px 2px rgba(79, 209, 255, .8);
  animation: art-blink 2.2s ease-in-out infinite;
}

@keyframes art-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .3; transform: scale(.65); }
}

/* 这块空盒子是画布上「AI」字形的定位区，JS 按它的尺寸采样 */
.art-glyph {
  width: 100%;
  height: clamp(190px, 20.5vw, 302px);
  /* 字形盒子里上下本来就留了字形的空白，正常排会跟标题空出一大截，
     负下边距把这段空白收回来；跟着视口缩放，窄屏不会贴到标题上 */
  margin: 2px 0 clamp(-32px, -2.2vw, -12px);
}

.art-title {
  margin: 0 0 12px;
  font-size: clamp(25px, 2.4vw, 34px);
  font-weight: 600;
  letter-spacing: -.8px;
  line-height: 1.25;
  color: #f2f6ff;
}

.art-title em {
  font-style: normal;
  background: linear-gradient(100deg, #5ec8ff, #9b7cff 74%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.art-sub {
  max-width: 462px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.9;
  color: #808ca4;
}

.art-mods {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.art-mods li {
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .028);
  font-size: 11.5px;
  color: #97a4bc;
  white-space: nowrap;
}

/* ---------- 右侧：深色玻璃登录卡 ---------- */

.login-card {
  position: relative;
  width: 100%;
  max-width: 404px;
  justify-self: end;
  padding: 30px 30px 26px;
  border-radius: 18px;
  border: 1px solid rgba(140, 172, 255, .14);
  background: linear-gradient(165deg, rgba(24, 30, 46, .9), rgba(11, 14, 22, .94));
  box-shadow:
    0 40px 90px -42px rgba(0, 0, 0, .95),
    0 0 60px -22px rgba(72, 122, 255, .45),
    inset 0 1px 0 rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}

/* 卡片顶部一道渐变发丝光，和背景的粒子色呼应 */
.login-card::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 0;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(86, 198, 255, .9) 32%, rgba(170, 138, 255, .9) 68%, transparent);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
}

.login-brand .brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 14px;
  letter-spacing: .4px;
  background: linear-gradient(140deg, #2f7bff, #8b5cf6);
  color: #fff;
  box-shadow:
    0 10px 24px -10px rgba(80, 120, 255, .95),
    inset 0 1px 0 rgba(255, 255, 255, .3);
}

.login-brand strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #eef3ff;
  letter-spacing: .1px;
}

.login-brand span {
  display: block;
  font-size: 10px;
  letter-spacing: .16em;
  color: #6f7b93;
}

.login-card h2 {
  margin-bottom: 4px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.2px;
  color: #f2f6ff;
}

.login-card .sub {
  margin: 0 0 20px;
  font-size: 12.5px;
  color: #7f8aa1;
}

/* 深色底下的表单控件：只作用于登录卡内部 */
.login-card .field { margin-bottom: 14px; }

.login-card .field label {
  margin-bottom: 6px;
  font-size: 12px;
  color: #8f9ab1;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  padding: 10px 12px;
  border-radius: 9px;
  border-color: rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .045);
  color: #eaf0ff;
  font-size: 14px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

.login-card input::placeholder { color: #5a6478; }

.login-card input[type="text"]:hover,
.login-card input[type="password"]:hover {
  border-color: rgba(255, 255, 255, .17);
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
  background: rgba(90, 140, 255, .07);
  border-color: rgba(110, 155, 255, .62);
  box-shadow: 0 0 0 3px rgba(80, 130, 255, .16);
}

/* 浏览器自动填充会刷成白底，这里压回深色 */
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: #eaf0ff;
  -webkit-box-shadow: 0 0 0 1000px #141a28 inset;
  caret-color: #eaf0ff;
}

.login-card .btn {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  font-size: 14px;
  letter-spacing: .04em;
}

/* 登录按钮用粒子色渐变，和背景呼应（只作用于登录页） */
.login-card .btn-primary {
  background: linear-gradient(115deg, #2563eb, #6d28d9);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(84, 74, 220, .95);
  transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
}

.login-card .btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -14px rgba(84, 74, 220, 1);
}

.login-card .btn-primary:active { transform: translateY(0); filter: brightness(.96); }

.login-card .btn-primary:focus-visible {
  outline: 2px solid rgba(109, 40, 217, .45);
  outline-offset: 2px;
}

.login-card .alert-error {
  margin-bottom: 14px;
  padding: 9px 12px;
  border-radius: 9px;
  border-color: rgba(255, 120, 120, .28);
  background: rgba(220, 80, 80, .12);
  color: #ffb4b4;
  font-size: 12.5px;
}

.login-hint {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, .09);
  font-size: 11.5px;
  line-height: 1.75;
  color: #78839a;
}

.login-hint strong { color: #a9b6cf; font-weight: 600; }

/* ---------- 响应式 ---------- */

@media (max-width: 1020px) {
  .login-stage {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .login-art { display: none; }
  .login-card { max-width: 400px; justify-self: center; }
}

@media (max-height: 760px) and (min-width: 1021px) {
  .login-card { padding: 24px 26px 22px; }
  .art-glyph { height: 190px; }
  .art-mods { margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-orb,
  .art-badge i {
    animation: none;
  }
}

/* ---------------- 表尾合计 ---------------- */

.table tfoot td {
  background: #fafbfc;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
  border-bottom: none;
}

/* ---------------- 个人统计视图 ---------------- */

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 统一工具栏控件高度，避免下拉框比日期框高出一截 */
.inline-form select,
.inline-form input {
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
}

.inline-form .btn { height: 38px; padding-top: 0; padding-bottom: 0; }

.inline-form .sep { color: var(--text-3); font-size: 13px; }

.person-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.person-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #2b3038, #14161a);
  flex: 0 0 42px;
}

.person-id strong {
  display: block;
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.4;
}

.person-id > span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d2d7de;
  display: inline-block;
}

.person-metrics {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  padding-left: 22px;
  border-left: 1px solid var(--line-soft);
}

.pm-item em {
  display: block;
  font-style: normal;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.pm-item span { font-size: 11.5px; color: var(--text-3); }

.person-bar > .btn { flex: 0 0 auto; }

/* 可点击的姓名 */
a.rank-name { transition: color .15s; }
a.rank-name:hover { color: var(--primary); }
a.rank-name:hover .rank-sub { color: var(--primary); }

.link-plain {
  color: inherit;
  transition: color .15s;
}

.link-plain:hover { color: var(--primary); }

/* ---------------- 客户漏斗 ---------------- */

.funnel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 4px 0 2px;
}

.funnel-step {
  display: flex;
  align-items: center;
  gap: 16px;
}

.funnel-bar-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-start;
}

.funnel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 2px 10px -4px rgba(15, 23, 42, .35);
  transition: transform .15s, box-shadow .15s, filter .15s;
}

.funnel-bar:hover {
  transform: translateY(-1px);
  filter: saturate(1.1);
  box-shadow: 0 7px 18px -7px rgba(15, 23, 42, .45);
}

.fb-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-count {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.fb-count i {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 400;
  opacity: .85;
  margin-left: 2px;
}

.funnel-side {
  width: 120px;
  flex: 0 0 120px;
  text-align: right;
  line-height: 1.45;
}

.funnel-side b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.funnel-rate { font-size: 11.5px; color: var(--text-3); }
.funnel-rate.good { color: #047857; }
.funnel-rate.mid  { color: #b45309; }
.funnel-rate.weak { color: #b91c1c; }

.funnel-lost {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--text-3);
}

.funnel-lost b { color: var(--text-2); font-weight: 600; }
.funnel-lost .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.funnel-lost .btn-link { margin-left: auto; }

/* 阶段快捷筛选 */
.stage-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.stage-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 11px;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}

.stage-tab:hover { border-color: #d4dae3; color: var(--text); background: #fafbfc; }
.stage-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.stage-tab span { font-variant-numeric: tabular-nums; opacity: .8; }
.stage-tab i { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.stage-tab.active i { background: #fff !important; }

/* 阶段选择器（表单） */
.stage-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stage-opt {
  position: relative;
  display: block;
  border: 1px solid #e6e9ee;
  border-radius: 10px;
  padding: 11px 13px;
  cursor: pointer;
  background: #fff;
  transition: all .15s;
}

.stage-opt:hover { border-color: var(--c); }

.stage-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stage-opt .so-name {
  position: relative;
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  padding-left: 15px;
}

.stage-opt .so-name::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}

.stage-opt .so-desc {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
  padding-left: 15px;
  line-height: 1.4;
}

.stage-opt:has(input:checked),
.stage-opt.checked {
  border-color: var(--c);
  background: #f9fbff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .07);
}

.stage-opt:has(input:checked) .so-name,
.stage-opt.checked .so-name { font-weight: 600; }

/* 紧凑列表（待跟进等） */
.mini-list { display: flex; flex-direction: column; }

.mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
}

.mini-item:last-child { border-bottom: none; }
.mini-item:hover .mini-main b { color: var(--primary); }
.mini-main { min-width: 0; }

.mini-main b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: color .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.mini-sub .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }

.mini-side {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.mini-side.overdue { color: #b91c1c; font-weight: 500; }

/* 时间线（阶段流转） */
.timeline { display: flex; flex-direction: column; }

.tl-item { display: flex; gap: 10px; padding: 7px 0; }

.tl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  flex: 0 0 7px;
  box-shadow: 0 0 0 3px #f2f4f7;
}

.tl-body { min-width: 0; flex: 1; }

.tl-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.tl-title a { color: var(--text); font-weight: 500; text-decoration: none; }
.tl-title a:hover { color: var(--primary); }

.tl-flow {
  color: var(--text-2);
  font-size: 11.5px;
  background: #f4f7fb;
  border-radius: 5px;
  padding: 1px 6px;
}

.tl-note { color: var(--text-3); font-size: 11.5px; }
.tl-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }

.text-danger { color: #b91c1c; }

/* ---------------- 分组管理 ---------------- */

.inline-form.wrap { flex-wrap: wrap; }

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.rename-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rename-form input[type="text"] {
  width: 118px;
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.del-form { display: inline-flex; align-items: center; }

/* ---------- 分组「是否有任务」开关 ---------- */

/* 列表里的圆点胶囊按钮：点一下就在「有任务 / 无任务」之间切换 */
.gt-form { display: inline-flex; align-items: center; }

.gtoggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s;
}

.gtoggle i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.gtoggle.is-on {
  background: #e9f7f0;
  border-color: #cbe9da;
  color: #12704a;
}

.gtoggle.is-on i {
  background: #25966c;
  box-shadow: 0 0 0 3px rgba(37, 150, 108, .14);
}

.gtoggle.is-off {
  background: #f1f3f6;
  border-color: #e3e8ee;
  color: #79818c;
}

.gtoggle.is-off i {
  background: #b3bac4;
}

.gtoggle:hover {
  box-shadow: 0 0 0 3px rgba(35, 39, 45, .05);
}

.gtoggle:active { transform: translateY(.5px); }

.gtoggle:focus-visible {
  outline: 2px solid #7c8694;
  outline-offset: 1px;
}

/* 新增分组表单里的复选框 */
.gt-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
}

/* 分组表格：窄屏下改为表格内横向滚动，避免名称被压成一字一行 */
.group-table { min-width: 720px; }
.group-table .cell-person > div:last-child { min-width: 0; }

/* 客户列表列较多：窄屏改为容器内横向滚动，避免中文被压成一字一行 */
.cust-table { min-width: 960px; }
.cust-table th { white-space: nowrap; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .person-metrics { gap: 20px; }
}

@media (max-width: 900px) {
  /* 窄屏柱状图：缩小间距与字号，保证 12 个月标签完整显示 */
  .vchart,
  .vchart-labels { gap: 5px; }
  .vchart-labels span { font-size: 10.5px; }
  .vbar { border-radius: 4px 4px 2px 2px; }

  .person-bar { gap: 12px; }
  /* 窄屏：按钮与姓名同行右对齐，指标区独占一行 */
  .person-bar > .btn { order: 2; margin-left: auto; width: auto; }
  .person-metrics {
    order: 3;
    margin-left: 0;
    width: 100%;
    padding-left: 0;
    padding-top: 12px;
    border-left: none;
    border-top: 1px solid var(--line-soft);
    justify-content: space-between;
  }
}

@media (max-width: 860px) {
  body { background: var(--bg); }
  .sidebar { display: none; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 0 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .user-info { display: none; }
  .rank-list.two-col { grid-template-columns: 1fr; }

  /* 客户漏斗：窄屏收窄右侧金额区，阶段选择两列 */
  .stage-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funnel-step { gap: 10px; }
  .funnel-side { width: 96px; flex: 0 0 96px; }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }

  .stage-picker { grid-template-columns: 1fr; }
  .funnel-bar { padding: 9px 12px; font-size: 12.5px; }
  .funnel-side { width: 84px; flex: 0 0 84px; }
  .funnel-side b { font-size: 12px; }
}

/* ---------------- 客户详情 ---------------- */

/* 列表里的客户名称可点进详情 */
.cell-person a.p-name {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid #e2e6ed;
  line-height: 1.35;
}

.cell-person a.p-name:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* 概览条：头像 + 名称 + 金额 / 操作 */
.hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.hero-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 600;
  flex: 0 0 46px;
}

.hero-main { min-width: 0; flex: 1; }

.hero-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.hero-sub {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.6;
}

.hero-side {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.hero-amount {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-actions { display: flex; gap: 8px; }

/* 阶段进度条 */
.stepper { display: flex; align-items: flex-start; }

.step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  padding: 16px 12px 0 0;
}

.step::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 2px;
  background: var(--line);
}

.step:last-child::before { display: none; }

.step.done::before,
.step.current::before { background: #ccd4e0; }

.step-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--line);
}

.step.done .step-dot {
  background: #b9c3d1;
  box-shadow: none;
}

.step.current .step-dot {
  background: var(--c);
  box-shadow: 0 0 0 4px var(--c-soft);
}

.step-name {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step.done .step-name { color: var(--text-2); }
.step.current .step-name { color: var(--text); font-weight: 600; }

.step-time {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

/* 流转记录：竖向轨道 */
.flow-log { display: flex; flex-direction: column; }

.fl-item { display: flex; gap: 12px; }

.fl-rail {
  position: relative;
  flex: 0 0 12px;
  display: flex;
  justify-content: center;
}

.fl-rail::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #dde2ea;
  transform: translateX(-50%);
}

.fl-item:first-child .fl-rail::before { top: 8px; }
.fl-item:last-child .fl-rail::before { bottom: auto; height: 8px; }
.fl-item:only-child .fl-rail::before { display: none; }

.fl-node {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 5px;
  background: var(--c);
  box-shadow: 0 0 0 3px #fff;
}

.fl-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 18px;
}

.fl-item:last-child .fl-body { padding-bottom: 0; }

.fl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fl-flow { font-size: 13px; color: var(--text-2); }
.fl-flow b { color: var(--text); font-weight: 500; }
.fl-flow i { color: var(--text-3); font-style: normal; margin: 0 6px; }

.fl-note {
  font-size: 11.5px;
  color: var(--text-2);
  background: #f4f6f9;
  border-radius: 5px;
  padding: 1px 7px;
}

.fl-meta {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* 详情页信息栅格 */
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.kv.single { grid-template-columns: 1fr; gap: 13px; }

.kv-label { font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; }

.kv-value {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
  line-height: 1.5;
}

.kv-aux { font-size: 11.5px; color: var(--text-3); }

.remark-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.75;
}

@media (max-width: 860px) {
  .hero { flex-wrap: wrap; }

  .hero-side {
    order: 3;
    width: 100%;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
  }

  .stepper { overflow-x: auto; padding-bottom: 4px; }
  .step { flex: 0 0 124px; }
}

@media (max-width: 560px) {
  .hero-name { font-size: 16px; }
  .hero-actions .btn { padding: 5px 10px; }
  .kv { grid-template-columns: 1fr; }
}

/* ---------------- 账号与权限 ---------------- */

.kv.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }

.perm-chip {
  font-size: 11.5px;
  color: var(--text-2);
  background: #f4f6f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
}

/* 角色选择 */
.role-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.role-opt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.role-opt input { display: none; }
.role-opt b { font-size: 13px; color: var(--text); font-weight: 500; }
.role-opt span { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.role-opt:hover { border-color: #d4dae3; }

.role-opt.checked {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.role-opt.checked b { color: var(--primary); }

/* 二级目录勾选 */
.perm-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.perm-panel.locked { opacity: .42; pointer-events: none; }

.perm-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px 14px;
}

.perm-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.perm-group-head b { font-size: 12.5px; color: var(--text); font-weight: 600; }

.perm-list { display: flex; flex-wrap: wrap; gap: 8px; }

.perm-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.perm-opt:hover { border-color: #d4dae3; }

.perm-opt.checked {
  border-color: #b9cdf6;
  background: var(--primary-soft);
  color: #1e4bbd;
}

.perm-opt input { accent-color: var(--primary); }

.perm-locked-tip {
  display: none;
  font-size: 12px;
  color: var(--text-3);
  padding: 0 2px;
}

.perm-panel.locked .perm-locked-tip { display: block; }

/* 重置密码条 */
.reset-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.reset-tip { font-size: 12px; color: var(--text-3); }

/* 无权访问 */
.forbidden-card {
  padding: 44px 24px;
  text-align: center;
}

.fb-mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f4f6f9;
  color: var(--text-3);
}

.forbidden-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.forbidden-card p {
  margin: 0 auto 20px;
  max-width: 440px;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.85;
}

.fb-actions { display: flex; gap: 10px; justify-content: center; }

@media (max-width: 860px) {
  .kv.three { grid-template-columns: 1fr; }
  .role-picker { grid-template-columns: 1fr; }
  .reset-bar { flex-wrap: wrap; }
}

/* 员工表单里的账号展示与提示 */
.account-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
}

.acc-name { font-weight: 500; color: var(--text); }
.acc-aux { font-size: 11.5px; color: var(--text-3); }

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.7;
}

.form-note svg { flex: 0 0 14px; margin-top: 2px; color: var(--text-3); }
.form-note b { color: var(--text); font-weight: 600; }

/* 客户情况快速编辑弹窗：比默认弹窗宽一些，便于写整段文字 */
dialog.modal.modal-wide { width: min(560px, calc(100vw - 32px)); }

#sitText { min-height: 168px; line-height: 1.75; }

.sit-count {
  margin-top: 6px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 工作进度检查 ---------------- */

/* 周次切换器 */
.week-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px;
}

.week-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--text-2);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.week-arrow:hover { background: #f2f4f7; color: var(--text); }
.week-arrow.disabled { opacity: .28; }

.week-now { padding: 0 10px; min-width: 150px; text-align: center; }
.week-now b { display: block; font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: -.1px; }
.week-now span { display: block; margin-top: 1px; font-size: 10.5px; color: var(--text-3); }

/* 例会时间 */
.meet-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
}

.meet-pill svg { color: var(--text-3); }
.meet-pill.passed { background: #fafbfc; color: var(--text-3); }

/* 本周概览 */
.pg-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 15px 20px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pg-sum-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 24px;
  margin-right: 24px;
  border-right: 1px solid var(--line-soft);
}

.pg-sum-item span { font-size: 11.5px; color: var(--text-3); }

.pg-sum-item b {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
}

.pg-sum-item b i { font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--text-3); }

.pg-sum-rule {
  flex: 1;
  min-width: 200px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.7;
}

/* 小组卡片 */
.pg-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 76px; }

/* 四个小组统一深灰底，不再按组区分颜色 */
.pg-card {
  background: #c2cbd5;
  border: 1px solid #a5b1bd;
  border-radius: var(--radius);
  overflow: hidden;
}

.pg-card.mine { border-color: #7d858f; box-shadow: 0 0 0 1px rgba(35, 39, 45, .08); }

.pg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #aeb9c5;
}

.pg-title { display: flex; align-items: center; gap: 10px; min-width: 0; }

.pg-mark {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #23272d;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.pg-title b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.pg-meta { margin-left: 8px; font-size: 11.5px; color: var(--text-3); }

.pg-tags { display: flex; gap: 6px; flex: 0 0 auto; }

.pg-tag {
  font-size: 11px;
  line-height: 18px;
  padding: 0 8px;
  border-radius: 20px;
  border: 1px solid var(--line);
  color: var(--text-3);
  background: #fff;
  white-space: nowrap;
}

.pg-tag.on { color: #fff; border-color: #2f343b; background: #2f343b; }

/* 责任人分块：每个责任人一个块，块内分「结果目标 / 行动目标」两段 */
.pg-owners {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 20px 14px;
}

.pg-owner {
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 10px;
  background: rgba(255, 255, 255, .84);
  overflow: hidden;
}

.pg-owner-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .55);
  border-bottom: 1px solid rgba(35, 39, 45, .07);
}

.pg-owner-avatar {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #2f343b;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
}

.pg-owner-avatar.is-none { background: #eef0f3; color: #9aa3b0; }

.pg-owner-sel {
  flex: 0 0 auto;
  width: 150px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #e6e9ef;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}

.pg-owner-sel:focus {
  outline: none;
  border-color: #7c8694;
  box-shadow: 0 0 0 3px rgba(47, 52, 59, .10);
}

.pg-owner-name { font-size: 13px; font-weight: 600; color: var(--text); }

.pg-owner-stat {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

.pg-owner-del {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b6bdc8;
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.pg-owner-del:hover { background: #fdeeee; color: var(--red); }

.pg-owner-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 12px 12px;
}

.pg-sec + .pg-sec { border-top: 1px dashed #eef1f5; padding-top: 10px; }

.pg-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.pg-sec-label { font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.pg-sec-stat { font-size: 11px; color: var(--text-3); }

.pg-sec-add {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 9px;
  border: 1px dashed #d6dbe4;
  border-radius: 6px;
  background: #fff;
  color: var(--text-2);
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}

.pg-sec-add:hover {
  border-color: #8d959f;
  color: #23272d;
  background: #f2f4f6;
}

.pg-sec-empty {
  padding: 10px 12px;
  border: 1px dashed #e8ebf0;
  border-radius: 8px;
  color: #aeb5c0;
  font-size: 12px;
}

.pg-owners-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed #e3e7ee;
  border-radius: 9px;
}

.pg-owners-empty svg { color: #b6bdc8; }

/* 添加责任人：有责任人时是个小按钮，空组时是一整块虚线入口 */
.pg-owner-add {
  order: 999;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border: 1px dashed #d6dbe4;
  border-radius: 7px;
  background: rgba(255, 255, 255, .75);
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}

.pg-owner-add:hover {
  border-color: #8d959f;
  color: #23272d;
  background: #fff;
}

.pg-owner-add.is-empty {
  align-self: stretch;
  justify-content: center;
  gap: 8px;
  height: 64px;
  background: rgba(255, 255, 255, .6);
  color: var(--text-3);
}

.pg-owner-add.is-empty:hover { color: #23272d; }

/* 结果目标清单：一组一期多条，每条带责任人 + 完成情况 */
.pg-result {
  padding: 14px 20px 16px;
  border-top: 1px solid var(--line-soft);
}

.pg-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.pg-result-stat { font-size: 11.5px; color: var(--text-3); }
.pg-result-head .pg-editable { margin-left: auto; }

.pg-items { display: flex; flex-direction: column; gap: 8px; }

.pg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  border: 1px solid #eceff3;
  border-radius: 9px;
  background: #fff;
}

.pg-item:hover { border-color: #dfe4ec; }

.pg-item-no {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f4f6f9;
  color: var(--text-3);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.pg-item-content {
  flex: 3 1 0;
  min-width: 150px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e6e9ef;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.pg-item-content:focus,
.pg-item-note:focus {
  outline: none;
  border-color: #7c8694;
  box-shadow: 0 0 0 3px rgba(47, 52, 59, .08);
}

.pg-item-content.is-text {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-color: transparent;
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

.pg-item-content.is-empty,
.pg-item-owner.is-empty,
.pg-item-note.is-empty { color: #c3c9d3; }

.pg-item-owner {
  flex: 0 0 108px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid #e6e9ef;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
}

.pg-item-owner.is-text {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border: 1px solid #eef1f5;
  border-radius: 7px;
  background: #fafbfc;
  color: var(--text-2);
}

.pg-item-status {
  flex: 0 0 96px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid #e6e9ef;
  border-radius: 7px;
  background: #fff;
  color: var(--text-2);
  font-size: 12.5px;
}

/* 状态三档用低饱和语义色：进行中蓝、已完成绿、未完成红，底色都很浅不抢正文 */
.pg-item-status.is-s1 { --st: #1e4bbd; --st-bg: #eaf1fd; --st-bd: #cbdcf8; }
.pg-item-status.is-s2 { --st: #12704a; --st-bg: #e8f7ef; --st-bd: #c4e6d5; }
.pg-item-status.is-s0 { --st: #a24040; --st-bg: #fdeeee; --st-bd: #f0d5d5; }

.pg-item-status.is-s1,
.pg-item-status.is-s2,
.pg-item-status.is-s0 {
  color: var(--st);
  border-color: var(--st-bd);
  background: var(--st-bg);
}

.pg-item-status.is-s2 { font-weight: 600; }

/* 员工只读时 select 是 disabled，别让浏览器把颜色压灰 */
.pg-item-status:disabled {
  opacity: 1;
  -webkit-text-fill-color: var(--st);
}

.pg-item-del {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b6bdc8;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.pg-item-del:hover { background: #fdeeee; color: var(--red); }

.pg-item-note {
  flex: 4 1 0;
  min-width: 180px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #eef1f5;
  border-radius: 7px;
  background: #fafbfd;
  color: var(--text-2);
  font-size: 12.5px;
}

.pg-item-note.is-text {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  color: var(--text-2);
  word-break: break-word;
}

/* 占位提示要淡，不能和真实填写的内容抢注意力 */
.pg-item-note::placeholder { color: #c2c9d2; }

/* 协同责任人：放在责任人块头（责任人下拉后面），整块目标共用一组协同人 */
.pg-co { position: relative; flex: 0 0 auto; }

/* 行内只保留承载提交值的隐藏勾选框 */
.pg-co-flag { display: none; }

.pg-co-owner .pg-co-btn { height: 30px; font-size: 12px; }

/* 块头在第一行，弹层往下展开，避免顶出卡片外 */
.pg-co-owner .pg-co-pop {
  left: 0;
  right: auto;
  top: calc(100% + 6px);
  bottom: auto;
}

.pg-co-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 104px;
  height: 32px;
  padding: 0 8px;
  border: 1px dashed #dfe3e9;
  border-radius: 7px;
  background: #fff;
  color: #b0b7c1;
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.pg-co-btn::-webkit-details-marker { display: none; }
.pg-co-btn::marker { content: ''; }

.pg-co[data-on="1"] .pg-co-btn {
  border-style: solid;
  border-color: #c2c9d2;
  background: #f2f4f6;
  color: #3f464e;
}

.pg-co[open] .pg-co-btn {
  border-color: #7c8694;
  box-shadow: 0 0 0 3px rgba(47, 52, 59, .08);
}

.pg-co-label { overflow: hidden; text-overflow: ellipsis; }

.pg-co-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 30;
  width: 176px;
  max-height: 190px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dfe3e9;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(18, 22, 28, .14);
}

.pg-co-pop-head {
  padding: 3px 8px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 11px;
  color: #9aa2ad;
}

.pg-co-none { padding: 6px 8px; font-size: 12px; color: #aab1bb; }

.pg-co-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
}

.pg-co-opt:hover { background: #f4f5f7; }
.pg-co-opt input { width: 14px; height: 14px; margin: 0; accent-color: #2f343b; }
.pg-co-opt input:disabled { opacity: .35; }
.pg-co-opt input:disabled + span { color: #b0b7c0; }

/* 员工只读态：直接显示协同人名字（多人全部列出，超长才省略） */
.pg-co-ro {
  flex: 0 0 auto;
  max-width: 240px;
  overflow: hidden;
  font-size: 11.5px;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 块头摘要要能放下多个名字，比行内那版宽得多 */
.pg-co-owner .pg-co-btn { max-width: 240px; }

/* 「添加责任人」浮层：责任人与协同人一次选好 */
.pg-addpop {
  position: fixed;
  z-index: 200;
  width: 238px;
  padding: 11px;
  border: 1px solid #dfe3e9;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(18, 22, 28, .18);
}

.pg-addpop[hidden] { display: none; }

.pg-addpop-head {
  margin-bottom: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: #23272d;
}

.pg-addpop-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pg-addpop-field > span {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: #6b747e;
}

.pg-addpop-sel {
  flex: 1 1 auto;
  min-width: 0;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #e6e9ef;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
}

.pg-addpop-sel:focus {
  outline: none;
  border-color: #7c8694;
  box-shadow: 0 0 0 3px rgba(47, 52, 59, .10);
}

.pg-addpop-label {
  margin: 2px 0 4px;
  font-size: 11px;
  color: #98a0aa;
}

.pg-addpop-list {
  max-height: 168px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #eef0f3;
  border-radius: 8px;
  background: #fbfbfc;
}

.pg-addpop-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.pg-addpop-btn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #e2e6eb;
  border-radius: 7px;
  background: #fff;
  color: #56606b;
  font-size: 12px;
  cursor: pointer;
}

.pg-addpop-btn:hover { border-color: #b9c1cb; color: #23272d; }

.pg-addpop-btn.is-main {
  border-color: #23272d;
  background: #23272d;
  color: #fff;
}

.pg-addpop-btn.is-main:hover { border-color: #333941; background: #333941; }

/* 面板要能浮出卡片，否则第一行的弹层会被 overflow:hidden 裁掉 */
.pg-card:has(.pg-co[open]) { overflow: visible; }

.pg-result-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px dashed #e3e7ee;
  border-radius: 9px;
  color: var(--text-3);
  font-size: 12.5px;
}

.pg-result-empty svg { color: #b6bdc8; }

/* 四宫格：目标 | 实际 左右对照 */
.pg-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-soft); }

.pg-cell { padding: 14px 20px 16px; border-top: 1px solid var(--line-soft); }
.pg-cell:nth-child(1),
.pg-cell:nth-child(2) { border-top: none; }

.pg-cell.actual { background: #fcfdfe; border-left: 1px solid var(--line-soft); }

.pg-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.pg-label { font-size: 11.5px; letter-spacing: .3px; color: var(--text-3); }
.pg-cell.actual .pg-label { color: var(--text-2); }
.pg-editable { font-size: 10.5px; color: #a4adbb; }

.pg-cell textarea {
  min-height: 92px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.75;
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 7px;
  resize: none;
}

.pg-cell textarea:hover { border-color: #d7dce5; }

.pg-cell textarea:focus {
  border-color: #7c8694;
  box-shadow: 0 0 0 3px rgba(47, 52, 59, .08);
}

.pg-text {
  min-height: 92px;
  padding: 9px 11px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.pg-text.is-empty { color: #c3c9d3; }

.pg-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 20px;
  border-top: 1px solid rgba(0, 0, 0, .05);
  background: transparent;
}

.pg-stamp { display: flex; gap: 14px; font-size: 11px; color: var(--text-3); }

/* 右下角浮动保存：一次提交页面上所有可编辑的小组 */
.pg-savebar {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 160;
}

.pg-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid #23272d;
  border-radius: 22px;
  background: #23272d;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 10px 24px rgba(18, 22, 28, .26);
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.pg-save-btn:hover {
  background: #333941;
  box-shadow: 0 12px 28px rgba(18, 22, 28, .32);
}

.pg-save-btn:active { transform: translateY(1px); }

.pg-save-btn[disabled] { cursor: default; opacity: .72; }

.pg-save-btn[data-state="done"] {
  border-color: #12704a;
  background: #12704a;
  box-shadow: 0 10px 24px rgba(18, 112, 74, .26);
}

.pg-save-btn[data-state="error"] {
  border-color: #a24040;
  background: #a24040;
  box-shadow: 0 10px 24px rgba(162, 64, 64, .26);
}

@media (max-width: 900px) {
  .pg-savebar { right: 14px; bottom: 14px; }
  .pg-save-btn { height: 42px; padding: 0 16px; font-size: 13px; }
}

/* 窄屏：一条目标的「内容 / 状态 / 说明 / 删除」换行堆叠，避免挤成一团 */
@media (max-width: 900px) {
  .pg-item { flex-wrap: wrap; }
  .pg-item-content { flex: 1 1 calc(100% - 40px); }
  .pg-item-status { flex: 0 0 96px; }
  .pg-item-note { flex: 1 1 100%; min-width: 0; }
  .pg-co-owner { margin-left: 0; }

  .pg-owner-head { flex-wrap: wrap; padding: 9px 12px; }
  .pg-owner-stat { order: 3; }
  .pg-owner-del { order: 4; }
  .pg-owner-body { padding: 6px 12px 12px; }
  .pg-owners { padding: 12px 12px 12px; }
  .pg-owners-empty { margin: 0; }
  .pg-summary { flex-wrap: wrap; }
}

/* 检查记录 */
.hist-stack { display: flex; flex-direction: column; gap: 14px; }

.hist-head-right { display: flex; align-items: center; gap: 14px; }

.hist-now {
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: #1e4bbd;
  font-size: 10.5px;
  font-weight: 400;
  vertical-align: 1px;
}

.hist-line { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.7; }
.hist-line + .hist-line { margin-top: 5px; }

.hist-line i {
  flex: 0 0 26px;
  font-style: normal;
  font-size: 10.5px;
  color: #b0b8c4;
  padding-top: 2px;
}

.hist-line span { flex: 1; min-width: 0; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.hist-line span.is-empty { color: #c9ced7; }
.hist-line.actual i { color: var(--text-2); }

.hist-by { font-size: 11.5px; color: var(--text-2); line-height: 1.6; }
.hist-by .p-sub { font-size: 11px; }

@media (max-width: 860px) {
  .pg-grid { grid-template-columns: 1fr; }
  .pg-cell:nth-child(2) { border-top: 1px solid var(--line-soft); }
  .pg-cell.actual { border-left: none; }
  .pg-sum-item { padding-right: 16px; margin-right: 16px; }
  .pg-head { flex-wrap: wrap; }
  .week-now { min-width: 120px; }

  /* 单列后格子宽度变大，不需要那么高 */
  .pg-text { min-height: 0; }
  .pg-cell textarea { min-height: 72px; }
  .pg-cell { padding: 12px 16px 14px; }
}

/* ---------------- 临时工作管理 ---------------- */

/* 任务列表列较多：窄屏改为容器内横向滚动 */
.task-table { min-width: 900px; }

.task-main { min-width: 220px; max-width: 420px; }

.task-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta { margin-top: 3px; font-size: 11px; color: #b3bbc7; }

.task-flag {
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 3px;
  background: var(--primary-soft);
  color: #1e4bbd;
  font-size: 10px;
  vertical-align: 1px;
}

/* 优先级 */
.pri-tag {
  display: inline-block;
  font-size: 11px;
  line-height: 18px;
  padding: 0 8px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-3);
  white-space: nowrap;
}

.pri-important { color: #a76508; border-color: #f2e2c4; background: #fdf8ee; }
.pri-urgent { color: #b23a3a; border-color: #f3d7d7; background: #fdf3f3; }

/* 逾期 */
.task-overdue { color: #b23a3a; font-weight: 500; }
.task-overdue-sub { margin-top: 1px; font-size: 10.5px; color: #c1686b; }

.task-result {
  max-width: 200px;
  font-size: 12.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-sum-item.is-alert b { color: #b23a3a; }

/* ---------------- 经费金额条（乐捐记录 / 消费记录） ---------------- */

/* 金额一律走红色：这是钱的事，得一眼看见；笔数保持灰，别抢戏 */
.pg-summary.is-money .pg-sum-item b {
  color: #c92a2a;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.6px;
}

.pg-summary.is-money .pg-sum-item b i {
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0;
}

/* 余额是这一条的落点：做成浅色块，视线最后停在这儿 */
.pg-summary.is-money .pg-sum-item.is-hero {
  padding: 7px 16px 8px;
  border-right-color: transparent;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff7f6, #fdeeec);
  box-shadow: inset 0 0 0 1px #f8dad6;
}

.pg-summary.is-money .pg-sum-item.is-hero span { color: #b03a2e; }

.pg-summary.is-money .pg-sum-item.is-hero b {
  font-size: 21px;
  color: #b42318;
}

/* 透支、待捐这类要提醒的项，用更深的红，与普通金额拉开层次 */
.pg-summary.is-money .pg-sum-item.is-alert b { color: #a4161a; }
.pg-summary.is-money .pg-sum-item.is-alert span { color: #b03a2e; }

/* 金额为 0 时不用红，避免一片红把人看花 */
.pg-summary.is-money .pg-sum-item.is-zero b { color: #a9afb8; }
.pg-summary.is-money .pg-sum-item.is-hero.is-zero { background: #fafafa; box-shadow: inset 0 0 0 1px var(--line); }
.pg-summary.is-money .pg-sum-item.is-hero.is-zero span { color: var(--text-3); }
.pg-summary.is-money .pg-sum-item.is-hero.is-zero b { color: #a9afb8; }

/* 状态 / 优先级三段选择 */
.status-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* .field label 是块级（0,2,0），会盖掉下面的 flex 卡片，这里用同等权重的规则压回来 */
.field .status-opt,
.field .role-opt {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.status-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.status-opt input { display: none; }
.status-opt b { font-size: 13px; font-weight: 500; color: var(--text); }
.status-opt span { font-size: 11.5px; color: var(--text-3); }
.status-opt:hover { border-color: #d4dae3; }
.status-opt.checked { border-color: #b9cbf2; background: var(--primary-soft); }
.status-opt.checked b { color: var(--primary); }

@media (max-width: 860px) {
  .status-picker { grid-template-columns: 1fr; }
  .task-main { max-width: none; min-width: 0; }
}

/* 操作列内的链接不折行（员工只有「填写进展」一个按钮，窄列容易断成两行） */
.task-table .row-actions { white-space: nowrap; }

/* 工作台上的临时任务卡片 */
.task-mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.task-mini-stats > div {
  padding: 8px 0;
  text-align: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fcfcfd;
}

.task-mini-stats b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.task-mini-stats span { font-size: 11px; color: var(--text-3); }
.task-mini-stats .is-alert b { color: #b23a3a; }

.task-mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}

.task-mini-row:last-child { border-bottom: none; }

.pri-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.pri-dot-important { background: #d79a3a; }
.pri-dot-urgent { background: #cc5353; }

.task-mini-title {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-mini-due { flex: 0 0 auto; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.task-mini-due.is-alert { color: #b23a3a; }

/* ---------------- 乐捐管理 ---------------- */

/* 事由：一句话，过长折成两行截断 */
.d-reason {
  max-width: 320px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 状态下方的小字：确认时间 / 已挂天数 */
.d-sub {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

.d-sub.is-alert { color: #c1686b; }

/* 两段式选择（是否乐捐），复用三段的卡片样式 */
.status-picker.two { grid-template-columns: repeat(2, 1fr); }

/* 金额快捷按钮 */
.amount-presets { display: flex; gap: 6px; margin-top: 8px; }

.amount-chip {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}

.amount-chip:hover { border-color: #b9cbf2; background: var(--primary-soft); color: var(--primary); }

@media (max-width: 860px) {
  .status-picker.two { grid-template-columns: 1fr; }
}

/* ---------------- 乐捐乐捐设置 ---------------- */

/* 新增事由：名称 + 默认金额 + 单位 */
.inline-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-3);
}

.inline-num input {
  width: 96px;
  height: 38px;
  text-align: right;
}

.inline-num .unit { color: var(--text-3); }

/* 行内编辑：名称 + 默认金额 + 保存 */
.reason-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reason-form input[type="text"] {
  width: 130px;
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.reason-form .reason-amount {
  width: 84px;
  height: 30px;
  padding: 0 8px;
  font-size: 13px;
  text-align: right;
}

/* 上移 / 下移小按钮 */
.move-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}

.move-btn:hover:not(:disabled) {
  border-color: #b9cbf2;
  background: var(--primary-soft);
  color: var(--primary);
}

.move-btn:disabled { opacity: .35; cursor: not-allowed; }

/* 列较多，窄屏改为容器内横向滚动 */
.reason-table { min-width: 780px; }
.reason-table .row-actions { white-space: nowrap; }

/* ---------------- 消费记录 ---------------- */

/* 表单里的经费参考：当前余额 + 本月已支出 */
.fund-ref {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fcfcfd;
  font-size: 12.5px;
  color: var(--text-3);
}

.fund-ref b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fund-ref b.is-alert { color: #b23a3a; }

/* 消费事项一行显示，过长省略 */
.consume-table .task-title { max-width: 520px; }

/* ---------------- 操作日志 ---------------- */

/* 列较多，窄屏改为容器内横向滚动；固定布局保证各列宽度可控 */
.log-table {
  min-width: 960px;
  table-layout: fixed;
  width: 100%;
}

/* 姓名 / 角色不换行，超长省略（鼠标悬停看 title） */
.log-table .cell-person > div:last-child { min-width: 0; }

.log-table .cell-person .p-name,
.log-table .cell-person .p-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-table .log-date {
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.log-table .log-clock {
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

/* 动作徽标：新增绿、修改蓝、删除红、账号类紫、系统灰 */
.log-badge { margin-right: 7px; }

/* 动作与模块上下排，窄屏不挤成两行 */
.log-op {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.log-op .log-badge { margin-right: 0; }

.log-add  { background: #eef8f2; color: #0b7d59; }
.log-edit { background: #eef2fd; color: #2f57c9; }
.log-del  { background: #fdf1f1; color: #b23a3a; }
.log-auth { background: #f4f1fb; color: #5b46a8; }
.log-sys  { background: #f2f4f7; color: #5b6472; }

.log-module {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

/* 对象列：单行显示，超长省略 */
.log-ellipsis {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

/* 详情列：前面可能带「未生效」徽标，剩余空间全部给文字 */
.log-cell-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.log-cell-detail > .badge { flex: 0 0 auto; }

.log-detail {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--text-3);
}

.log-ip {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 未生效的记录（被拒 / 失败）用左侧红条提醒 */
.log-table tr.is-failed td:first-child {
  box-shadow: inset 3px 0 0 #e8b4b4;
}

.log-table tr.is-failed .log-date { color: #a4545a; }

/* 筛选条分两行：条件一行、时间与按钮一行 */
.log-filters {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
}

.log-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.log-filter-label {
  font-size: 12px;
  color: var(--text-3);
}

/* 时间区间 + 按钮作为一个整体，窄屏时整块换行，不会只剩一个按钮吊在第二行 */
.log-filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================================
   工作台 · 模块驾驶舱
   一级目录一卡：图标色条 + 主指标 + 两个小指标
   ============================================================ */

/* ---------------- 快捷操作条 ---------------- */

.db-quick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.db-quick-label {
  font-size: 12px;
  color: var(--text-3);
  margin-right: 2px;
}

.db-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 33px;
  padding: 0 13px;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  transition: transform .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.db-quick-btn svg { color: var(--text-3); transition: color .16s ease; }

.db-quick-btn:hover {
  color: var(--text);
  border-color: #ccd6e6;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -10px rgba(16, 24, 40, .34);
}

.db-quick-btn:hover svg { color: var(--primary); }

.db-quick-btn.is-ghost { background: transparent; box-shadow: none; color: var(--text-3); }

/* ---------------- 模块矩阵 ---------------- */

.db-mods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.db-mod {
  position: relative;
  display: block;
  padding: 15px 17px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

/* 顶边一条模块色，扫视时先认颜色再认字 */
.db-mod::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--mod-c, #2559d6);
  opacity: .8;
}

.db-mod:hover {
  transform: translateY(-2px);
  border-color: #dbe2ec;
  box-shadow: 0 12px 26px -18px rgba(16, 24, 40, .42);
}

.db-mod-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-mod-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mod-soft, #eff3ff);
  color: var(--mod-c, #2559d6);
  flex: 0 0 auto;
}

.db-mod-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: -.1px;
}

.db-mod-go {
  margin-left: auto;
  color: #c3cad6;
  display: flex;
  transition: color .18s ease, transform .18s ease;
}

.db-mod:hover .db-mod-go { color: var(--mod-c, var(--primary)); transform: translateX(2px); }

.db-mod-value {
  margin-top: 12px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1.1px;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.db-mod-value span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0;
  margin-left: 5px;
}

/* 金额长度不可控，字号收一档，避免撑破卡片 */
.db-mod-value.is-money {
  font-size: 23px;
  letter-spacing: -.6px;
  color: #c92a2a;
}

.db-mod-note {
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-mod-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  min-height: 20px;
}

.db-chip {
  font-size: 11.5px;
  color: var(--text-2);
  background: #f5f6f8;
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.db-chip.is-alert { background: #fdf1f1; color: #b23a3a; }

/* ---------------- 待处理 ---------------- */

.db-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .02em;
}

.db-approve td { padding-top: 9px; padding-bottom: 9px; }
.db-approve tr:first-child td { padding-top: 4px; }
.db-approve-range { font-size: 12.5px; white-space: nowrap; }
.db-approve-ops { text-align: right; white-space: nowrap; }

.db-todo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  transition: background .15s ease;
}

.db-approve + .db-todo,
.table-wrap + .db-todo { border-top: 1px solid var(--line); }

.db-todo:hover { background: #fafbfc; }

.db-todo-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f6;
  color: var(--text-3);
  flex: 0 0 auto;
}

.db-todo-ico.is-alert { background: #fdeeee; color: #c0392b; }

.db-todo-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.db-todo-txt b { font-size: 13px; font-weight: 500; color: var(--text); }
.db-todo-txt i { font-style: normal; font-size: 11.5px; color: var(--text-3); }

.db-todo-num {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.db-todo-num.is-alert { color: #c0392b; }

.db-todo-go { color: #c3cad6; display: flex; }
.db-todo:hover .db-todo-go { color: var(--primary); }

/* ---------------- 最近动态 ---------------- */

.db-feed { padding: 6px 0; }

.db-feed-item {
  display: flex;
  gap: 10px;
  padding: 8px 20px;
}

.db-feed-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 7px;
  flex: 0 0 auto;
  background: #c3cad6;
}

.db-feed-dot.is-add { background: #0f9d6e; }
.db-feed-dot.is-edit { background: #2559d6; }
.db-feed-dot.is-del { background: #dc4a4a; }
.db-feed-dot.is-auth { background: #7c5cd6; }
.db-feed-dot.is-sys { background: #9aa3b2; }

.db-feed-main { min-width: 0; flex: 1; }

.db-feed-text {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-feed-text b { font-weight: 500; color: var(--text); }

.db-feed-target { color: var(--text-3); }

.db-feed-time {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

/* 组数 0 / 5 的分母：比主数字小一档，读起来是「0 / 5」而不是两个数拼在一起 */
.db-mod-frac {
  font-size: 18px;
  font-weight: 500;
  color: #b3bac5;
  margin-left: 3px;
  letter-spacing: 0;
}

/* 首卡跨两列：7 张卡在 4 列网格里正好铺满两行 */
.db-mod.is-wide { grid-column: span 2; }
.db-mod.is-wide .db-mod-value { font-size: 33px; }

/* 宽卡左数字右指标，避免右侧留一大片空白；窄卡仍按上下排 */
.db-mod-wide-body { display: block; }

.db-mod.is-wide .db-mod-wide-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.db-mod-wide-body > div:first-child { min-width: 0; }

.db-mod.is-wide .db-mod-foot {
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  margin: 0 0 5px;
  padding: 0;
  border: none;
  min-height: 0;
  flex: 0 0 auto;
}

.db-mod.is-wide .db-chip {
  font-size: 12px;
  padding: 3px 9px;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1180px) {
  .db-mods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-mod.is-wide { grid-column: span 2; }
}

@media (max-width: 620px) {
  .db-mods { grid-template-columns: 1fr; }
  .db-mod.is-wide { grid-column: span 1; }
  .db-quick-label { display: none; }
}

/* ============================================================
   进度检查 · 周期列表
   ============================================================ */

/* 概览条里的告警项（原先只有 is-money 作用域下有样式） */
.pg-sum-item.is-alert b { color: #b23a3a; }
.pg-sum-item.is-alert span { color: #b03a2e; }

.period-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-3);
}

.period-hint svg { color: #b9c2cf; }
.period-hint b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }

.period-table td { padding-top: 12px; padding-bottom: 12px; }

.period-range {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.1px;
}

.period-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-3);
}

.period-now {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 5px;
  background: #23272d;
  color: #fff;
  font-size: 10.5px;
  line-height: 16px;
  vertical-align: 1px;
}

.period-check {
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.period-progress {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}

.period-progress-pct {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.period-bar {
  margin-top: 6px;
  height: 5px;
  border-radius: 3px;
  background: #eef1f5;
  overflow: hidden;
}

.period-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #23272d, #6b747e);
  transition: width .3s ease;
}

.period-chip {
  display: inline-block;
  margin-right: 5px;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  white-space: nowrap;
}

.period-chip.is-target { background: #eef0f3; color: #3f464e; }
.period-chip.is-actual { background: #e2e6ea; color: #23272d; }

.period-state {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  white-space: nowrap;
}

.period-state.is-running { background: #23272d; color: #fff; }
.period-state.is-pending { background: #e8ebef; color: #5c646d; }
.period-state.is-over    { background: #f3f4f6; color: var(--text-3); }

.period-foot {
  margin: 12px 2px 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.75;
}

@media (max-width: 1180px) {
  .period-table th:nth-child(4),
  .period-table td:nth-child(4) { display: none; }
  .period-hint { display: none; }
}

/* 周期列表的操作列不折行 */
.period-table td:last-child { white-space: nowrap; }

/* ================= 经营目标 ================= */

/* ---------- 目标设置（bs-*） ---------- */
.bs-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bs-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 168px 150px;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfd;
}

.bs-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eceff3;
  color: #3b424b;
}

.bs-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bs-name b {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.bs-name span {
  font-size: 11.5px;
  color: var(--text-3);
}

.bs-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bs-input input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.bs-input input:focus {
  outline: none;
  border-color: #7c8694;
  box-shadow: 0 0 0 3px rgba(47, 52, 59, .08);
}

.bs-input i {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 12px;
  color: var(--text-3);
}

.bs-now {
  font-size: 11.5px;
  color: var(--text-3);
  text-align: right;
}

.bs-now b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.bs-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
}

.bs-foot .hint {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-3);
}

/* ---------- 年度目标（rv-*）：深色主视觉 + 彩色数据卡 ---------- */

/* 顶栏「实时同步」标识 */
.rv-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 20px;
  background: #f2f6fb;
  border: 1px solid #e6edf6;
  font-size: 11.5px;
  color: #667085;
}

.rv-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .14);
  animation: rvPulse 2.4s ease-in-out infinite;
}

@keyframes rvPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, .14); }
  50%      { box-shadow: 0 0 0 5px rgba(16, 185, 129, .05); }
}

/* ===== 主视觉：深色底 + 冷色光晕 ===== */
.rv-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 30px;
  border-radius: 18px;
  background:
    radial-gradient(120% 150% at 86% -10%, rgba(99, 102, 241, .34) 0%, rgba(99, 102, 241, 0) 55%),
    radial-gradient(90% 130% at 0% 110%, rgba(34, 211, 238, .16) 0%, rgba(34, 211, 238, 0) 55%),
    linear-gradient(135deg, #0f141a 0%, #161e28 55%, #0f1720 100%);
  color: #eef2f7;
  box-shadow: 0 22px 44px -30px rgba(10, 15, 21, .9), inset 0 1px 0 rgba(255, 255, 255, .07);
  overflow: hidden;
}

/* 装饰光斑 */
.rv-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}

.rv-glow.is-a {
  top: -70px;
  right: 120px;
  width: 210px;
  height: 210px;
  background: rgba(99, 102, 241, .22);
}

.rv-glow.is-b {
  bottom: -90px;
  left: 34%;
  width: 190px;
  height: 190px;
  background: rgba(34, 211, 238, .12);
}

.rv-hero.is-done .rv-glow.is-a { background: rgba(52, 211, 153, .2); }
.rv-hero.is-late .rv-glow.is-a { background: rgba(244, 63, 94, .2); }

.rv-hero-main {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.rv-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .6px;
  color: rgba(226, 232, 240, .62);
}

.rv-eyebrow em {
  font-style: normal;
  color: rgba(226, 232, 240, .3);
}

.rv-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, .8);
}

.rv-hero.is-late .rv-eyebrow-dot {
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, .75);
}

.rv-hero.is-done .rv-eyebrow-dot {
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, .75);
}

.rv-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 10px;
}

.rv-value b {
  font-size: 54px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -2.6px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 24px rgba(99, 102, 241, .28);
}

.rv-value span {
  font-size: 14px;
  color: rgba(226, 232, 240, .5);
}

.rv-caption {
  margin-top: 9px;
  font-size: 13px;
  color: rgba(226, 232, 240, .58);
}

.rv-caption b {
  font-weight: 600;
  color: #ffffff;
}

.rv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.rv-tag {
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid transparent;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .2px;
}

.rv-tag.is-warn {
  background: rgba(244, 63, 94, .14);
  border-color: rgba(244, 63, 94, .26);
  color: #fda4af;
}

.rv-tag.is-run {
  background: rgba(34, 211, 238, .13);
  border-color: rgba(34, 211, 238, .24);
  color: #7dd3fc;
}

.rv-tag.is-ok {
  background: rgba(52, 211, 153, .14);
  border-color: rgba(52, 211, 153, .26);
  color: #6ee7b7;
}

.rv-tag.is-mute {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .1);
  color: rgba(226, 232, 240, .62);
}

.rv-tag.is-ghost {
  border-color: rgba(255, 255, 255, .16);
  color: rgba(226, 232, 240, .68);
}

/* ===== 环形进度 ===== */
.rv-ring {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 142px;
  height: 142px;
}

.rv-ring svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 6px 18px rgba(99, 102, 241, .35));
}

.rv-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, .09);
  stroke-width: 9;
}

.rv-ring-fill {
  fill: none;
  stroke: url(#rvGradRun);
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset .8s cubic-bezier(.25, .8, .3, 1);
}

.rv-hero.is-run  .rv-ring-fill { stroke: url(#rvGradRun); }
.rv-hero.is-late .rv-ring-fill { stroke: url(#rvGradLate); }
.rv-hero.is-done .rv-ring-fill { stroke: url(#rvGradDone); }

/* 环上的时间进度刻度 */
.rv-ring-mark {
  stroke: rgba(255, 255, 255, .38);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 3 2.5;
}

.rv-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.rv-ring-text b {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -.9px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.rv-ring-text b i {
  margin-left: 1px;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  color: rgba(226, 232, 240, .55);
}

.rv-ring-text span {
  font-size: 10.5px;
  letter-spacing: 1px;
  color: rgba(226, 232, 240, .42);
}

/* ===== 三张数值卡 ===== */
.rv-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.rv-kpi {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  border: 1px solid #e9edf3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}

.rv-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -18px rgba(16, 24, 40, .5);
}

.rv-kpi::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
}

.rv-kpi.is-target::after { background: linear-gradient(180deg, #818cf8, #6366f1); }
.rv-kpi.is-done::after   { background: linear-gradient(180deg, #67e8f9, #06b6d4); }
.rv-kpi.is-gap::after    { background: linear-gradient(180deg, #fcd34d, #f59e0b); }
.rv-kpi.is-ok::after     { background: linear-gradient(180deg, #6ee7b7, #10b981); }

.rv-kpi-ico {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.rv-kpi.is-target .rv-kpi-ico { background: rgba(99, 102, 241, .1);  color: #4f46e5; }
.rv-kpi.is-done .rv-kpi-ico   { background: rgba(6, 182, 212, .1);   color: #0891b2; }
.rv-kpi.is-gap .rv-kpi-ico    { background: rgba(245, 158, 11, .12); color: #d97706; }
.rv-kpi.is-ok .rv-kpi-ico     { background: rgba(16, 185, 129, .12); color: #059669; }

.rv-kpi-body { min-width: 0; }

.rv-kpi-body > span {
  font-size: 11.5px;
  letter-spacing: .2px;
  color: #98a2b3;
}

.rv-kpi-body b {
  display: block;
  margin-top: 3px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.5px;
  color: #101828;
  font-variant-numeric: tabular-nums;
}

.rv-kpi-body b i {
  margin-left: 3px;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 400;
  color: #98a2b3;
}

.rv-kpi-body b.is-ok { color: #059669; }

/* ===== 白卡 ===== */
.rv-card {
  margin-top: 14px;
  padding: 19px 24px 20px;
  border: 1px solid #e9edf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.rv-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.rv-card-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: #101828;
}

.rv-head-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.rv-head-dot.is-cyan   { background: linear-gradient(135deg, #67e8f9, #22d3ee); }
.rv-head-dot.is-indigo { background: linear-gradient(135deg, #a5b4fc, #6366f1); }

.rv-card-head > span {
  font-size: 11.5px;
  color: #98a2b3;
}

/* ===== 双条对照 ===== */
.rv-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rv-bar-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 14px;
}

.rv-bar-label {
  font-size: 12px;
  color: #667085;
}

.rv-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #f2f5f9;
  overflow: hidden;
}

.rv-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width .55s cubic-bezier(.25, .8, .3, 1);
}

.rv-bar i.is-run  { background: linear-gradient(90deg, #6366f1, #22d3ee); }
.rv-bar i.is-late { background: linear-gradient(90deg, #f59e0b, #f43f5e); }
.rv-bar i.is-ok   { background: linear-gradient(90deg, #34d399, #06b6d4); }

.rv-bar i.is-time {
  background: repeating-linear-gradient(135deg, #dbe3ee 0 6px, #eef2f7 6px 12px);
}

.rv-bar-num {
  font-size: 12.5px;
  font-weight: 600;
  color: #101828;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rv-bar-num.is-muted {
  font-weight: 400;
  color: #98a2b3;
}

.rv-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px dashed #eef2f7;
  font-size: 11.5px;
  color: #98a2b3;
}

.rv-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rv-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.rv-swatch.is-solid  { background: linear-gradient(135deg, #6366f1, #22d3ee); }
.rv-swatch.is-stripe { background: repeating-linear-gradient(135deg, #dbe3ee 0 3px, #eef2f7 3px 6px); }

.rv-legend-note {
  margin-left: auto;
  color: #a9b2c0;
}

/* ===== 月度柱状图 ===== */
.rv-plot {
  position: relative;
  height: 134px;
}

.rv-grid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.rv-grid i {
  display: block;
  border-top: 1px dashed #e9eef6;
}

.rv-cols {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 10px;
  height: 100%;
}

.rv-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  min-width: 0;
}

.rv-col-val {
  font-size: 10.5px;
  line-height: 1;
  color: #667085;
  white-space: nowrap;
}

.rv-col i {
  display: block;
  width: 100%;
  max-width: 34px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #67e8f9 0%, #6366f1 100%);
  box-shadow: 0 8px 16px -10px rgba(99, 102, 241, .8);
  transition: height .5s cubic-bezier(.25, .8, .3, 1), filter .18s;
}

.rv-col.is-now i {
  background: linear-gradient(180deg, #22d3ee 0%, #4f46e5 100%);
  box-shadow: 0 10px 20px -10px rgba(79, 70, 229, .95);
}

.rv-col.is-zero i {
  background: #eef2f7;
  box-shadow: none;
}

.rv-col:hover i { filter: brightness(1.08); }

.rv-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.rv-months span {
  text-align: center;
  font-size: 10.5px;
  color: #a9b2c0;
}

.rv-months span.is-now {
  color: #4f46e5;
  font-weight: 600;
}

.rv-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 6px;
  font-size: 12px;
  line-height: 1.7;
  color: #98a2b3;
}

.rv-empty svg { flex: 0 0 auto; color: #cfd8e3; }

/* ===== 底部口径 ===== */
.rv-note {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px dashed #e4eaf1;
  border-radius: 12px;
  background: #fbfcfe;
  font-size: 11.5px;
  line-height: 1.8;
  color: #98a2b3;
}

.rv-note b {
  margin-right: 6px;
  color: #667085;
}

.rv-note a {
  color: #4f46e5;
  white-space: nowrap;
  text-decoration: none;
}

.rv-note a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .rv-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 20px;
  }

  .rv-value b { font-size: 42px; letter-spacing: -1.8px; }
  .rv-ring { align-self: center; }

  .rv-kpis { grid-template-columns: 1fr; }
  .rv-card { padding: 16px; }
  .rv-card-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .rv-bar-row { grid-template-columns: 54px minmax(0, 1fr) 52px; gap: 10px; }
  .rv-legend { flex-wrap: wrap; gap: 10px; }
  .rv-legend-note { margin-left: 0; }
  .rv-cols, .rv-months { gap: 5px; }
  .rv-col-val { display: none; }
}

/* 设置页仍复用的空状态 / 说明条 */
.bt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 46px 20px;
  color: var(--text-3);
  text-align: center;
}

.bt-empty b {
  font-size: 14px;
  color: var(--text-2);
}

.bt-empty span {
  max-width: 460px;
  font-size: 12.5px;
  line-height: 1.7;
}

.bt-tip {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid #e3e7ec;
  border-radius: var(--radius-sm);
  background: #f7f9fb;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-3);
}

.bt-tip b {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--text-2);
}

@media (max-width: 900px) {
  .bs-row {
    grid-template-columns: 34px minmax(0, 1fr);
    row-gap: 10px;
  }

  .bs-input { grid-column: 2; }
  .bs-now   { grid-column: 2; text-align: left; }

  .bs-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .rv-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 20px;
  }

  .rv-value b { font-size: 42px; letter-spacing: -1.8px; }
  .rv-ring { align-self: center; }

  .rv-kpis { grid-template-columns: 1fr; }
  .rv-kpi { border-left: 0; border-top: 1px solid #eef1f4; }
  .rv-kpi:first-child { border-top: 0; }

  .rv-card { padding: 16px; }
  .rv-card-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .rv-bar-row { grid-template-columns: 54px minmax(0, 1fr) 52px; gap: 10px; }
  .rv-legend { flex-wrap: wrap; gap: 10px; }
  .rv-legend-note { margin-left: 0; }
  .rv-chart { gap: 5px; }
  .rv-col-val { display: none; }
}
