/* ============ 锋汇 RPA · 管理平台 设计系统 v2 ============ */
:root {
  --bg: #f4f6fb;
  --bg-2: #eef2f9;
  --panel: #ffffff;
  --ink: #0d1728;
  --ink-2: #43516a;
  --ink-3: #8592a6;
  --line: #e7ecf4;
  --line-2: #f0f4f9;
  --primary: #3b6ef6;
  --primary-dark: #2a56d6;
  --primary-soft: #eef3ff;
  --primary-ink: #1c46c4;
  --indigo: #6d5efc;
  --success: #12a150;
  --success-soft: #e8f9ef;
  --warn: #e2871f;
  --warn-soft: #fdf4e6;
  --danger: #dc3545;
  --danger-soft: #fdeced;
  --purple: #7c3aed;
  --purple-soft: #f4eeff;
  --cyan: #0a92b4;
  --sidebar: #0a1222;
  --sidebar-2: #101d33;
  --shadow: 0 1px 2px rgba(16, 28, 48, .04), 0 6px 20px -12px rgba(16, 28, 48, .16);
  --shadow-hover: 0 2px 6px rgba(16, 28, 48, .06), 0 18px 36px -20px rgba(16, 28, 48, .26);
  --radius: 14px;
  --radius-sm: 9px;
  --ring: 0 0 0 3px rgba(59, 110, 246, .14);
  --grad-primary: linear-gradient(135deg, #4b7bf8 0%, #3b6ef6 45%, #5f5cf3 100%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 0;
}

a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb {
  background: #ccd6e5; border-radius: 8px;
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #b3c1d4; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: linear-gradient(178deg, #0c1526 0%, #0a1222 48%, #080f1c 100%);
  color: #9fb0c7;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 40;
  overflow: hidden;
}
/* 侧边栏顶部光晕 + 细网格质感 */
.sidebar::before {
  content: ""; position: absolute; left: -70px; top: -110px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 110, 246, .38), transparent 66%);
  pointer-events: none;
}
.sidebar::after {
  content: ""; position: absolute; right: -140px; bottom: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 94, 252, .12), transparent 70%);
  pointer-events: none;
}

.brand {
  padding: 22px 18px 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
  z-index: 2;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, #6d9bff 0%, #4b7bf8 42%, #6355f0 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 750; font-size: 16px;
  letter-spacing: -.5px;
  box-shadow: 0 6px 18px -4px rgba(75, 123, 248, .6), inset 0 1px 0 rgba(255, 255, 255, .35);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 55%);
  pointer-events: none;
}
.brand-name { color: #fff; font-weight: 650; font-size: 15px; letter-spacing: .2px; }
.brand-sub { color: #5f728c; font-size: 10.5px; margin-top: 3px; letter-spacing: 1.1px; }

.nav { padding: 4px 12px 12px; flex: 1; overflow-y: auto; position: relative; z-index: 2; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); }
.nav-label {
  font-size: 10.5px; color: #4d5f78; letter-spacing: 1.4px;
  padding: 16px 11px 7px; text-transform: uppercase; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #a3b3c9;
  cursor: pointer;
  font-size: 13.5px;
  margin-bottom: 2px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
  position: relative;
  border: 1px solid transparent;
}
.nav-item:hover {
  background: rgba(255, 255, 255, .055);
  color: #e8eefa;
}
.nav-item.active {
  background: linear-gradient(96deg, rgba(59, 110, 246, .26) 0%, rgba(59, 110, 246, .08) 100%);
  color: #fff; font-weight: 600;
  border-color: rgba(120, 160, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #7aa2ff, #4b7bf8);
  box-shadow: 0 0 12px rgba(90, 140, 255, .8);
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .78; transition: opacity .16s; }
.nav-item:hover svg, .nav-item.active svg { opacity: 1; }

.sidebar-foot {
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  position: relative; z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .18));
}
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 8px; border-radius: 10px; cursor: pointer;
  transition: background .16s;
}
.user-chip:hover { background: rgba(255, 255, 255, .06); }
.avatar {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(140deg, #3c4c66, #263148);
  color: #cfdaea; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex: 0 0 30px;
  border: 1px solid rgba(255, 255, 255, .08);
}
.user-chip .u-name { color: #e6edf8; font-size: 13px; font-weight: 550; }
.user-chip .u-role { color: #64768e; font-size: 11px; margin-top: 1px; }

.main {
  flex: 1; margin-left: 232px; min-width: 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(900px 340px at 22% -8%, rgba(59, 110, 246, .07), transparent 70%),
    radial-gradient(700px 300px at 96% 0%, rgba(109, 94, 252, .05), transparent 70%),
    var(--bg);
  min-height: 100vh;
}

.topbar {
  height: 66px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  padding: 0 26px;
  gap: 14px;
  position: sticky; top: 0; z-index: 30;
}
.page-title { font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: #0b1524; }
.page-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.content { padding: 22px 26px 48px; max-width: 1580px; width: 100%; }
.content > * { animation: fadeUp .34s cubic-bezier(.22, .68, .3, 1) both; }
.content > *:nth-child(2) { animation-delay: .03s; }
.content > *:nth-child(3) { animation-delay: .06s; }
.content > *:nth-child(4) { animation-delay: .09s; }
.content > *:nth-child(5) { animation-delay: .12s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-2);
  position: relative;
}
.card-title {
  font-size: 14px; font-weight: 660; letter-spacing: -.1px;
  display: flex; align-items: center; gap: 9px;
}
.card-title::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px;
  background: linear-gradient(180deg, #6d9bff, #4b7bf8);
  flex: 0 0 3px;
}
.card-sub { font-size: 12px; color: var(--ink-3); }
.card-body { padding: 16px 18px; flex: 1 1 auto; }
.card-body.tight { padding: 8px 6px; }
.card-body > .empty { height: 100%; justify-content: center; padding: 28px 10px; }
.table-wrap { overflow-x: auto; min-width: 0; border-radius: 0 0 var(--radius) var(--radius); }
#sch-card .card-head { padding-bottom: 13px; }

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px 15px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #dbe4f2; }
.kpi::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #8fb3ff, #4b7bf8);
  opacity: .9;
}
.kpi::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 128px; height: 128px; border-radius: 50%;
  background: radial-gradient(circle, rgba(75, 123, 248, .11) 0%, rgba(75, 123, 248, .05) 42%, transparent 68%);
}
.kpi.ok::before { background: linear-gradient(180deg, #62d39a, #12a150); }
.kpi.warn::before { background: linear-gradient(180deg, #f8c06a, #e2871f); }
.kpi.bad::before { background: linear-gradient(180deg, #f79aa3, #dc3545); }
.kpi.ok::after { background: radial-gradient(circle, rgba(18, 161, 80, .1) 0%, rgba(18, 161, 80, .045) 42%, transparent 68%); }
.kpi.warn::after { background: radial-gradient(circle, rgba(226, 135, 31, .11) 0%, rgba(226, 135, 31, .05) 42%, transparent 68%); }
.kpi.bad::after { background: radial-gradient(circle, rgba(220, 53, 69, .1) 0%, rgba(220, 53, 69, .045) 42%, transparent 68%); }

.kpi-label {
  font-size: 12.5px; color: var(--ink-3); font-weight: 500;
  display: flex; align-items: center; gap: 7px;
  position: relative; z-index: 2;
}
.kpi-ico {
  width: 22px; height: 22px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
  flex: 0 0 22px;
}
.kpi-ico svg { width: 13px; height: 13px; }
.kpi.ok .kpi-ico { background: var(--success-soft); color: #0f8a45; }
.kpi.warn .kpi-ico { background: var(--warn-soft); color: #c0730f; }
.kpi.bad .kpi-ico { background: var(--danger-soft); color: #c92a3a; }

.kpi-value {
  font-size: 28px; font-weight: 720; letter-spacing: -1.1px;
  margin-top: 9px; line-height: 1.12;
  font-variant-numeric: tabular-nums;
  color: #0b1524;
  position: relative; z-index: 2;
}
.kpi-value small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.kpi-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 7px; line-height: 1.6; position: relative; z-index: 2; }
.kpi.accent .kpi-value { color: var(--primary); }
.kpi.ok .kpi-value { color: #0f8a45; }
.kpi.warn .kpi-value { color: #c0730f; }
.kpi.bad .kpi-value { color: #c92a3a; }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.mb-16 { margin-bottom: 16px; }
.mb-10 { margin-bottom: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f2;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .16s ease;
  box-shadow: 0 1px 1px rgba(16, 28, 48, .03);
}
.btn:hover {
  border-color: #c6d4e8; color: var(--ink);
  background: #fcfdff;
  box-shadow: 0 2px 8px -3px rgba(16, 28, 48, .16);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--grad-primary);
  border-color: transparent; color: #fff; font-weight: 560;
  box-shadow: 0 4px 14px -5px rgba(59, 110, 246, .7), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #3f70f2, #315fee 45%, #534ff0);
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 22px -8px rgba(59, 110, 246, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-danger { color: #c92a3a; border-color: #f3cdd2; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: #eeb0b7; color: #b71f2f; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: #eff3fa; border-color: transparent; box-shadow: none; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }
.link-btn {
  color: var(--primary); cursor: pointer; font-size: 13px;
  background: none; border: none; padding: 0; font-weight: 500;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 2px; }
.link-danger { color: #c92a3a; }

/* ---------- 表单 ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { margin-left: auto; }
.input, .select, textarea.input {
  height: 34px; padding: 0 11px;
  border: 1px solid #e2e8f2;
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13px; color: var(--ink);
  outline: none;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea.input { height: auto; padding: 9px 11px; line-height: 1.65; resize: vertical; }
.input:hover, .select:hover { border-color: #cfdaeb; }
.input:focus, .select:focus, textarea.input:focus {
  border-color: #8badf9; box-shadow: var(--ring); background: #fff;
}
.input::placeholder { color: #b6c0cf; }
.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='%238592a6' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 28px; cursor: pointer;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 550; }
.field label .req { color: var(--danger); margin-left: 2px; }
.field .input, .field .select, .field textarea.input { width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search-box { position: relative; }
.search-box .input { padding-left: 32px; width: 220px; }
.search-box svg { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: var(--ink-3); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }

/* ---------- 表格 ---------- */
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th {
  text-align: left; font-weight: 600; color: #6b7a90;
  font-size: 11.5px; letter-spacing: .4px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #fafbfe, #f6f8fc);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: relative;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .13s; }
.table tbody tr:hover { background: #f8faff; }
.table tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 #9dbcff; }
.table tfoot td {
  background: #f8fafd; font-weight: 650;
  border-top: 1px solid var(--line);
  border-bottom: none; color: #23324a;
}
.table .num { font-variant-numeric: tabular-nums; text-align: right; }
.table th.num { text-align: right; }
.table .row-title { font-weight: 570; color: var(--ink); }
.table .row-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.table-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.clickable { cursor: pointer; }

/* ---------- 标签 / 徽章 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 550;
  background: #f2f5fa; color: var(--ink-2);
  white-space: nowrap;
  border: 1px solid rgba(16, 28, 48, .05);
  letter-spacing: .1px;
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip-blue { background: #eef3ff; color: #1c46c4; border-color: #dfe8ff; }
.chip-green { background: #e9f9ef; color: #0d7f3f; border-color: #d5f0e0; }
.chip-amber { background: #fdf4e6; color: #a96307; border-color: #f8e8cd; }
.chip-red { background: #fdeced; color: #b72232; border-color: #f7d8db; }
.chip-purple { background: #f4eeff; color: #6430c9; border-color: #e9dcff; }
.chip-cyan { background: #e6f7fb; color: #0b6f88; border-color: #d0edf5; }
.chip-gray { background: #f2f5fa; color: #5c6b81; }
.tag {
  display: inline-block; padding: 1px 6px; border-radius: 5px;
  background: #f4f6fa; color: var(--ink-3); font-size: 11.5px; margin-right: 4px;
}

/* ---------- 进度 ---------- */
.progress { height: 6px; background: #edf1f8; border-radius: 6px; overflow: hidden; min-width: 60px; }
.progress > i {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #6f9bff, #4b7bf8);
  transition: width .45s cubic-bezier(.22, .68, .3, 1);
}
.progress.ok > i { background: linear-gradient(90deg, #52cd8e, #12a150); }
.progress.warn > i { background: linear-gradient(90deg, #f7c269, #e2871f); }
.progress.bad > i { background: linear-gradient(90deg, #f38b96, #dc3545); }
.progress > i.bar-ok { background: linear-gradient(90deg, #52cd8e, #12a150); }
.progress > i.bar-over { background: linear-gradient(90deg, #f6a2ab, #e04150); }
.progress-wrap { display: flex; align-items: center; gap: 8px; }
.progress-val { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; width: 34px; text-align: right; }

/* ---------- 阶段步骤条 ---------- */
.stepper { display: flex; align-items: center; gap: 0; }
.step { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.step-dot {
  width: 25px; height: 25px; border-radius: 50%;
  border: 1.5px solid #e3e9f3;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--ink-3); background: #fff; flex: 0 0 25px;
  font-weight: 650;
}
.step.done .step-dot {
  background: linear-gradient(140deg, #45cd8a, #12a150); border-color: transparent; color: #fff;
  box-shadow: 0 3px 8px -3px rgba(18, 161, 80, .6);
}
.step.doing .step-dot {
  background: var(--grad-primary); border-color: transparent; color: #fff;
  box-shadow: 0 0 0 4px rgba(59, 110, 246, .12), 0 4px 10px -3px rgba(59, 110, 246, .6);
}
.step-name { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.step.done .step-name { color: var(--ink-2); }
.step.doing .step-name { color: var(--primary); font-weight: 650; }
.step-line { flex: 1; height: 1.5px; background: #e8edf5; margin: 0 8px; min-width: 12px; }
.step.done .step-line { background: linear-gradient(90deg, #8fe3b6, #a7e0bd); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(10, 18, 32, .46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  z-index: 100; padding: 60px 20px 40px; overflow-y: auto;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { transform: translateY(12px) scale(.985); opacity: 0 } to { transform: none; opacity: 1 } }
.modal {
  background: #fff; border-radius: 16px; width: 560px; max-width: 100%;
  box-shadow: 0 32px 80px -20px rgba(10, 18, 32, .45), 0 0 0 1px rgba(16, 28, 48, .04);
  animation: rise .2s cubic-bezier(.22, .68, .3, 1);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 100px);
}
.modal.wide { width: 780px; }
.modal-head {
  display: flex; align-items: center; padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, #fbfcff, #fff);
}
.modal-title { font-size: 15px; font-weight: 680; letter-spacing: -.2px; }
.modal-close {
  margin-left: auto; cursor: pointer; color: var(--ink-3);
  border: none; background: none; font-size: 18px; line-height: 1; padding: 3px 5px;
  border-radius: 7px; transition: all .14s;
}
.modal-close:hover { background: #eff3fa; color: var(--ink); }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1 1 auto; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line-2);
  display: flex; justify-content: flex-end; gap: 10px;
  background: #fbfcff;
}

/* ---------- Toast ---------- */
#toast-host { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: rgba(15, 26, 44, .95);
  backdrop-filter: blur(8px);
  color: #fff; padding: 11px 16px;
  border-radius: 10px; font-size: 13px;
  box-shadow: 0 16px 40px -12px rgba(10, 18, 32, .5), inset 0 0 0 1px rgba(255, 255, 255, .08);
  animation: rise .2s ease; max-width: 400px; line-height: 1.55;
}
.toast.ok { background: rgba(11, 106, 55, .96); }
.toast.err { background: rgba(150, 27, 39, .96); }

/* ---------- 其它 ---------- */
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.empty {
  text-align: center; color: var(--ink-3); padding: 46px 10px; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.empty svg {
  width: 40px; height: 40px; opacity: .3; margin-bottom: 10px;
  color: #8fa3bf;
}
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  padding: 9px 13px; font-size: 13.5px; color: var(--ink-3);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 650; }
.list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-bottom: 1px dashed var(--line-2);
  border-radius: 8px;
}
.list-row:hover { background: #f8faff; }
.list-row:last-child { border-bottom: none; }
.pill-count { font-size: 12px; color: var(--ink-3); background: #f3f6fb; border-radius: 20px; padding: 1px 8px; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); }

/* ---------- 登录页 ---------- */
.login-page { min-height: 100vh; display: flex; }
.login-left {
  flex: 1.15;
  background:
    radial-gradient(760px 460px at 8% 6%, rgba(28, 63, 154, .85) 0%, transparent 68%),
    radial-gradient(520px 360px at 100% 100%, rgba(72, 58, 165, .34) 0%, transparent 64%),
    linear-gradient(160deg, #0a1222 0%, #0b1628 55%, #070d17 100%);
  color: #fff; padding: 54px 58px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
/* 细网格底纹 */
.login-left::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 78%);
  pointer-events: none;
}
.login-left::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -260px; bottom: -300px;
  background: radial-gradient(circle, rgba(105, 150, 255, .16) 0%, rgba(105, 150, 255, .06) 45%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.login-copy { margin-top: auto; margin-bottom: auto; position: relative; z-index: 2; }
.login-copy h1 {
  font-size: 36px; line-height: 1.3; margin: 0 0 18px;
  letter-spacing: -1.2px; font-weight: 700;
  background: linear-gradient(120deg, #ffffff 20%, #c8d8ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-copy p { color: #98aabf; font-size: 14.5px; line-height: 1.95; margin: 0; max-width: 470px; }
.login-points { display: flex; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.login-points span {
  font-size: 12.5px; color: #c6d3e4;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .11);
  padding: 6px 13px; border-radius: 20px;
  backdrop-filter: blur(4px);
  display: inline-flex; align-items: center; gap: 6px;
}
.login-points span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: #6f9bff; box-shadow: 0 0 8px #6f9bff;
}
.login-right {
  width: 500px; flex: 0 0 500px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.login-form { width: 100%; max-width: 336px; }
.login-form h2 { font-size: 24px; margin: 0 0 7px; letter-spacing: -.5px; font-weight: 700; }
.login-form .sub { color: var(--ink-3); font-size: 13px; margin-bottom: 28px; }
.login-form .input { width: 100%; height: 44px; font-size: 14px; border-radius: 10px; padding: 0 13px; }
.login-form .btn { width: 100%; height: 44px; font-size: 14.5px; margin-top: 8px; border-radius: 10px; letter-spacing: 2px; }
.login-tip {
  margin-top: 20px; font-size: 12px; color: var(--ink-3);
  background: #f7f9fd; border: 1px dashed #dde5f0; border-radius: 9px;
  padding: 11px 13px; line-height: 1.8;
}
.login-tip b { color: var(--ink-2); }
.login-err { color: #c92a3a; font-size: 12.5px; margin-top: 10px; min-height: 18px; }

/* ---------- 图表 ---------- */
.chart-wrap { width: 100%; overflow: hidden; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 12px; justify-content: center; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }

/* ---------- 发票与项目成本 ---------- */
.up-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.up-fields .field { margin-bottom: 0; }

.dropzone {
  border: 1.5px dashed #cfdbeb; border-radius: 12px; padding: 24px 16px;
  text-align: center;
  background:
    radial-gradient(400px 120px at 50% 0%, rgba(59, 110, 246, .05), transparent 70%),
    #fbfdff;
  cursor: pointer;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.dropzone:hover { border-color: #a3bdf0; background-color: #f8fbff; box-shadow: inset 0 0 0 3px rgba(59, 110, 246, .04); }
.dropzone.over { border-color: var(--primary); background-color: var(--primary-soft); box-shadow: inset 0 0 0 3px rgba(59, 110, 246, .08); }
.dropzone.busy { pointer-events: none; opacity: .6; }
.dz-icon { color: #9db0c7; margin-bottom: 7px; display: flex; justify-content: center; }
.dz-main { font-size: 13.5px; color: var(--ink); }
.dz-main b { color: var(--primary); font-weight: 600; }
.dz-sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

.up-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.up-progress .progress { flex: 1; }

.up-summary { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 10px 12px; border-radius: 9px; font-size: 12.5px; }
.up-summary.ok { background: var(--success-soft); color: #0d7f3f; }
.up-summary.warn { background: var(--warn-soft); color: #a96307; }
.up-list { margin-top: 6px; }
.up-item { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; color: var(--ink-2); }
.up-item:last-child { border-bottom: none; }
.up-name { color: var(--ink); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-msg { color: var(--ink-3); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.batch-bar {
  display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
  padding: 9px 13px;
  background: linear-gradient(96deg, #eef3ff, #f4f7ff);
  border: 1px solid #dce7ff;
  border-radius: 9px; font-size: 12.5px; color: #1c46c4;
}
.batch-bar b { font-size: 13px; }

.inv-table { min-width: 1040px; }
.inv-table th, .inv-table td { white-space: nowrap; }
.inv-table .table-actions { flex-wrap: nowrap; }
.cell-clip { display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-sub { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.inv-sub .chip { height: 19px; font-size: 11px; padding: 0 6px; }
.inv-msg { font-size: 11.5px; color: var(--ink-3); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.inv-seller { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.inv-table td { padding-top: 9px; padding-bottom: 9px; }
.inv-table .row-sel { background: #f6f9ff; }
.inv-file { display: flex; align-items: center; gap: 6px; cursor: pointer; max-width: 230px; }
.inv-file:hover .inv-fname { color: var(--primary); }
.inv-fname { font-size: 12.5px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money-strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.mono { font-variant-numeric: tabular-nums; font-size: 12.5px; letter-spacing: .2px; }

.bar-mini { height: 7px; background: #eef2f9; border-radius: 4px; overflow: hidden; }
.bar-mini i { display: block; height: 100%; background: linear-gradient(90deg, #6f9bff, #3b6ef6); border-radius: 4px; }

.tip-line {
  font-size: 12.5px; color: #96580a;
  background: linear-gradient(96deg, #fdf5e8, #fefaf2);
  border: 1px solid #f7e7cd;
  border-radius: 9px; padding: 9px 12px; margin-bottom: 14px; line-height: 1.75;
}

.preview-box { height: 70vh; background: #f7f9fd; border-radius: 10px; overflow: auto; text-align: center; }
.preview-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.preview-box img { max-width: 100%; display: block; margin: 0 auto; }

input[type="number"] { font-variant-numeric: tabular-nums; }

@media (max-width: 1180px) {
  .up-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .up-fields { grid-template-columns: 1fr; }
}

/* ---------- 多选列表（添加项目成员） ---------- */
.pick-list {
  max-height: 240px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 5px; background: #fff;
}
.pick-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px; border-radius: 7px; cursor: pointer; font-size: 13px;
}
.pick-row:hover { background: #f6f9ff; }
.pick-row input { margin: 0; cursor: pointer; }
.pick-name { font-weight: 600; color: var(--ink); min-width: 56px; }

/* ---------- 人员排期预览 ---------- */
.sch-switch {
  display: inline-flex; background: #f0f3fa; border-radius: 9px;
  padding: 3px; gap: 2px; border: 1px solid #e9eef7;
}
.sch-switch button {
  border: 0; background: transparent; font-size: 11.5px; color: var(--ink-2);
  padding: 4px 10px; border-radius: 7px; cursor: pointer; line-height: 1.4;
  transition: color .14s, background .14s;
}
.sch-switch button:hover { color: var(--primary); }
.sch-switch button.on {
  background: #fff; color: var(--primary); font-weight: 650;
  box-shadow: 0 1px 3px rgba(16, 28, 48, .12);
}

.sch-wrap { overflow-x: auto; min-width: 0; }
.sch-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.sch-table.span-30 { min-width: 1024px; }
.sch-table .sch-c-name { width: 158px; }
.sch-table .sch-c-total { width: 72px; }
.sch-table.span-30 .sch-c-name { width: 136px; }
.sch-table.span-30 .sch-c-total { width: 56px; }
.sch-table.span-30 th.sch-name, .sch-table.span-30 .sch-name { padding-left: 12px; }
.sch-table.span-30 th.sch-total, .sch-table.span-30 .sch-total { padding-right: 10px; }

.sch-table th.sch-th {
  font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  padding: 9px 6px; text-align: left;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe, #f7f9fd);
}
.sch-table th.sch-name { padding-left: 18px; }
.sch-table th.sch-total { text-align: right; padding-right: 18px; }
.sch-dh {
  padding: 7px 2px 6px; text-align: center;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line-2);
}
.sch-dh .sch-md { font-size: 11.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sch-dh .sch-wd { font-size: 10px; color: var(--ink-3); margin-top: 1px; }
.sch-dh.is-weekend { background: #fafbfe; }
.sch-dh.is-weekend .sch-md, .sch-dh.is-weekend .sch-wd { color: #bcc6d4; }
.sch-dh.is-today {
  background: linear-gradient(180deg, #eaf1ff, #f4f8ff);
  box-shadow: inset 0 2px 0 var(--primary);
}
.sch-dh.is-today .sch-md, .sch-dh.is-today .sch-wd { color: var(--primary); font-weight: 700; }

.sch-name { height: 46px; padding: 0 6px 0 18px; border-bottom: 1px solid var(--line-2); }
.sch-name-in { display: flex; align-items: center; gap: 9px; }
.sch-avatar { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; font-size: 11px; }
.sch-nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sch-nm b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.sch-nm i { font-style: normal; font-size: 10.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-row:hover .sch-name, .sch-row:hover .sch-total { background: #f8faff; }
.sch-row:hover .sch-cell { background: #fafcff; }

.sch-cell {
  height: 46px; padding: 3px; vertical-align: middle;
  border-bottom: 1px solid var(--line-2); border-left: 1px solid var(--line-2);
}
.sch-cell.is-weekend { background: #fbfcfe; }
.sch-cell.is-today { background: rgba(59, 110, 246, .045); }
.sch-stack { display: flex; flex-direction: column; gap: 2px; height: 40px; }
.sch-bar {
  border-radius: 5px; min-height: 11px; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: filter .14s, transform .14s, box-shadow .14s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(16, 28, 48, .12);
}
.sch-bar:hover { filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 8px -2px rgba(16, 28, 48, .28); }
.sch-bar span {
  font-size: 9.5px; line-height: 1; color: #fff; padding: 0 2px;
  letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .16);
}
.sch-table.compact .sch-bar span { display: none; }

.sch-total {
  text-align: right; padding: 0 18px 0 4px; height: 46px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink);
}

.sch-legend {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding: 12px 18px 14px; border-top: 1px solid var(--line-2);
  background: #fcfdff;
  border-radius: 0 0 var(--radius) var(--radius);
}
.sch-lg { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); }
.sch-lg i { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; }

/* ---------- 我的上班（按日分组） ---------- */
.att-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 18px; border-bottom: 1px solid var(--line-2);
  transition: background .13s;
}
.att-row:last-child { border-bottom: none; }
.att-row:hover { background: #f8faff; }
.att-date {
  width: 66px; flex: 0 0 66px;
  font-size: 13px; font-weight: 620; color: var(--ink);
  font-variant-numeric: tabular-nums;
  display: flex; flex-direction: column; gap: 1px;
}
.att-date i { font-style: normal; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.att-items { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.att-item {
  display: inline-flex; align-items: center; gap: 7px;
  background: #f6f9ff; border: 1px solid #e4ecfb; border-radius: 8px;
  padding: 4px 10px; font-size: 12px; max-width: 100%;
}
.att-item b { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.att-item em { font-style: normal; color: var(--primary); font-weight: 650; font-variant-numeric: tabular-nums; }
.att-auto { font-size: 10px; color: #7c8ba1; border: 1px solid #e3e9f2; border-radius: 4px; padding: 0 3px; background: #fff; }
.att-manual { font-size: 10px; color: #a96307; border: 1px solid #f3ddba; background: #fdf6ec; border-radius: 4px; padding: 0 3px; }
.att-total {
  width: 48px; flex: 0 0 48px; text-align: right;
  font-size: 14px; font-weight: 680; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.att-badges { flex: 0 0 128px; display: flex; gap: 5px; justify-content: flex-end; }
.att-ops { flex: 0 0 86px; display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- 响应式 ---------- */
@media (max-width: 1360px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .grid-2, .grid-3, .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); }
  .login-left { display: none; }
  .login-right { flex: 1; width: auto; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .page-title { font-size: 16px; }
}
