/* ============ 企业资金流程管理系统 - 全局样式 ============ */
:root {
  --primary: #2456e6;
  --primary-dark: #1a41b8;
  --primary-light: #eaf0fe;
  --navy: #101f3c;
  --navy-2: #16294e;
  --text: #1c2333;
  --text-2: #5a6478;
  --text-3: #8a93a6;
  --line: #e5e9f1;
  --bg: #f2f4f9;
  --card: #ffffff;
  --green: #16a34a;
  --green-bg: #e7f6ec;
  --orange: #d97706;
  --orange-bg: #fdf1df;
  --red: #dc2626;
  --red-bg: #fdeaea;
  --blue: #2563eb;
  --blue-bg: #e8effd;
  --purple: #7c3aed;
  --purple-bg: #f1eafd;
  --gray-bg: #eef0f5;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 31, 60, .07), 0 4px 16px rgba(16, 31, 60, .05);
  --shadow-lg: 0 8px 40px rgba(16, 31, 60, .22);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

/* ============ 布局 ============ */
#app { display: flex; min-height: 100vh; }
#sidebar {
  width: 224px; flex: 0 0 224px; background: linear-gradient(180deg, var(--navy) 0%, #0b1730 100%);
  color: #cdd6ea; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#view { flex: 1; padding: 22px 26px 40px; max-width: 1460px; width: 100%; margin: 0 auto; }

/* ============ 侧边栏 ============ */
.logo { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; }
.logo .mark {
  width: 38px; height: 38px; border-radius: 9px; flex: 0 0 38px;
  background: linear-gradient(135deg, #3b82f6, #2456e6);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.logo b { color: #fff; font-size: 15.5px; letter-spacing: .5px; display: block; }
.logo span { font-size: 11px; color: #7e8db0; }
.nav-group { padding: 10px 12px; }
.nav-caption { font-size: 11px; color: #64748f; padding: 12px 10px 6px; letter-spacing: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 2px;
  border-radius: 8px; cursor: pointer; color: #aeb9d4; font-size: 14px; transition: all .15s;
  user-select: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(36, 86, 230, .35); }
.nav-item svg { flex: 0 0 18px; }
.nav-item .cnt {
  margin-left: auto; background: rgba(255, 255, 255, .14); border-radius: 9px;
  font-size: 11px; padding: 1px 7px; color: #e5ecff;
}
.sidebar-foot { margin-top: auto; padding: 14px 18px; font-size: 11px; color: #5d6c92; border-top: 1px solid rgba(255,255,255,.07); }

/* ============ 顶栏 ============ */
#topbar {
  height: 58px; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 26px; gap: 14px;
  position: sticky; top: 0; z-index: 40;
}
.top-title { font-size: 16px; font-weight: 600; }
.top-sub { color: var(--text-3); font-size: 12.5px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.role-box { display: flex; align-items: center; gap: 8px; background: var(--primary-light); border: 1px solid #d4e0fc; padding: 5px 6px 5px 12px; border-radius: 999px; }
.role-box label { font-size: 12px; color: var(--text-2); }
.role-box select { border: none; background: transparent; font-size: 13px; color: var(--primary-dark); font-weight: 600; outline: none; cursor: pointer; }
.role-box select option { color: var(--text); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}

/* ============ 卡片 / 统计 ============ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card, .stack > * + * { margin-top: 18px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.card-h h3 { font-size: 15px; }
.card-h .hint { color: var(--text-3); font-size: 12px; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 18px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; display: flex; gap: 14px; align-items: center; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,31,60,.1); }
.stat .ic { width: 46px; height: 46px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: 0 0 46px; }
.stat .num { font-size: 24px; font-weight: 700; line-height: 1.15; }
.stat .lbl { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.ic.blue { background: var(--blue-bg); color: var(--blue); }
.ic.orange { background: var(--orange-bg); color: var(--orange); }
.ic.green { background: var(--green-bg); color: var(--green); }
.ic.purple { background: var(--purple-bg); color: var(--purple); }
.ic.cyan { background: #dff5f3; color: #0e9384; }
.ic.red { background: var(--red-bg); color: var(--red); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 13px; padding: 7px 14px;
  border-radius: 8px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: #c9d4ea; background: #f7f9fe; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { background: #12833c; }
.btn.danger { background: #fff; border-color: #f3c1c1; color: var(--red); }
.btn.danger:hover { background: var(--red-bg); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.xs { padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.link { border: none; background: none; color: var(--primary); padding: 4px 6px; }
.btn.link:hover { background: var(--primary-light); }
.btn.link.danger { color: var(--red); }
.btn.link.danger:hover { background: var(--red-bg); }

/* ============ 工具栏 / 搜索 ============ */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 12px; width: 260px;
}
.search input { border: none; outline: none; font-size: 13px; flex: 1; background: transparent; color: var(--text); }
.search svg { color: var(--text-3); }
select.filter {
  border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 10px;
  font-size: 13px; color: var(--text); outline: none; cursor: pointer;
}
.mine-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.mine-chk input { accent-color: var(--primary); cursor: pointer; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-weight: 600; color: var(--text-2); background: #f8fafd;
  padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid #eef1f7; vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #f7f9fd; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .mono { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.tbl .money { font-weight: 600; font-variant-numeric: tabular-nums; }
.tbl .ops { white-space: nowrap; text-align: right; }
.tbl .sub { color: var(--text-3); font-size: 12px; margin-top: 2px; }
.tbl .sub.nowrap { white-space: nowrap; }

/* ============ 徽标 ============ */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-gray { background: var(--gray-bg); color: #5b6474; }
.b-orange { background: var(--orange-bg); color: var(--orange); }
.b-green { background: var(--green-bg); color: var(--green); }
.b-red { background: var(--red-bg); color: var(--red); }
.b-blue { background: var(--blue-bg); color: var(--blue); }
.b-purple { background: var(--purple-bg); color: var(--purple); }
.tag { display: inline-block; font-size: 11.5px; color: var(--text-2); background: var(--gray-bg); border-radius: 5px; padding: 2px 7px; margin: 2px 4px 2px 0; }

/* ============ 空状态 ============ */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty svg { margin-bottom: 10px; opacity: .5; }
.empty p { font-size: 13.5px; }

/* ============ 弹窗 ============ */
.overlay {
  position: fixed; inset: 0; background: rgba(13, 22, 44, .5); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px;
  animation: fadeIn .16s ease; overflow-y: auto;
}
.dialog {
  background: #fff; border-radius: 14px; width: 640px; max-width: 100%;
  box-shadow: var(--shadow-lg); animation: pop .18s ease; margin-bottom: 40px;
}
.dialog.wide { width: 860px; }
.dialog-h { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-h h3 { font-size: 16px; }
.dialog-h .x { margin-left: auto; border: none; background: none; font-size: 20px; color: var(--text-3); cursor: pointer; width: 30px; height: 30px; border-radius: 7px; }
.dialog-h .x:hover { background: var(--gray-bg); color: var(--text); }
.dialog-b { padding: 20px; max-height: calc(100vh - 200px); overflow-y: auto; }
.dialog-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ============ 表单 ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.fi label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.fi label .req { color: var(--red); margin-left: 2px; }
.fi input, .fi select, .fi textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px;
  font-size: 13.5px; color: var(--text); outline: none; transition: border .15s, box-shadow .15s;
  font-family: inherit; background: #fff;
}
.fi textarea { resize: vertical; min-height: 66px; }
.fi input:focus, .fi select:focus, .fi textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(36, 86, 230, .12); }
.fi .tip { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.form-sec { font-size: 13px; font-weight: 700; color: var(--text); margin: 18px 0 10px; padding-left: 9px; border-left: 3px solid var(--primary); }
.form-sec:first-child { margin-top: 0; }

/* ============ 上传区 ============ */
.upzones { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.upzone { border: 1.5px dashed #c8d3ea; border-radius: 10px; padding: 12px; background: #fafbfe; transition: all .15s; }
.upzone.drag { border-color: var(--primary); background: var(--primary-light); }
.upzone .uz-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.upzone .uz-head b { font-size: 13px; }
.upzone .uz-head .req { color: var(--red); }
.upzone .uz-head .cnt { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.upzone .uz-drop {
  border: 1.5px dashed #c8d3ea; border-radius: 8px; background: #fff; text-align: center;
  padding: 14px 8px; cursor: pointer; color: var(--text-3); font-size: 12.5px; transition: all .15s;
}
.upzone .uz-drop:hover, .upzone.drag .uz-drop { border-color: var(--primary); color: var(--primary); background: #f6f9ff; }
.upzone .uz-drop svg { display: block; margin: 0 auto 6px; }
.upzone input[type=file] { display: none; }
.uz-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.uz-file {
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 8px; font-size: 12.5px;
}
.uz-file .fico { flex: 0 0 16px; color: var(--primary); }
.uz-file .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uz-file .fsize { color: var(--text-3); font-size: 11px; flex: 0 0 auto; }
.uz-file .fx { border: none; background: none; color: var(--text-3); cursor: pointer; font-size: 14px; width: 20px; height: 20px; border-radius: 5px; flex: 0 0 20px; }
.uz-file .fx:hover { background: var(--red-bg); color: var(--red); }
.uz-file.loading .fname { color: var(--text-3); }
.uz-file.loading::after {
  content: ""; width: 12px; height: 12px; border: 2px solid #d6defb; border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; flex: 0 0 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 附件列表（详情） ============ */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.att {
  display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 10px; background: #fbfcfe;
}
.att .thumb {
  width: 40px; height: 40px; border-radius: 7px; background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex: 0 0 40px; overflow: hidden; cursor: pointer;
}
.att .thumb img { width: 100%; height: 100%; object-fit: cover; }
.att .ameta { min-width: 0; flex: 1; }
.att .aname { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .asub { font-size: 11px; color: var(--text-3); margin-top: 2px; display: flex; gap: 6px; white-space: nowrap; overflow: hidden; }
.att .asub span { overflow: hidden; text-overflow: ellipsis; }
.att .aops { display: flex; flex-direction: column; gap: 3px; }
.att .aops a, .att .aops button { font-size: 11.5px; border: none; background: none; cursor: pointer; padding: 1px 4px; border-radius: 4px; color: var(--primary); text-align: center; }
.att .aops button { color: var(--text-3); }
.att .aops button:hover { color: var(--red); background: var(--red-bg); }
.att .aops a:hover { background: var(--primary-light); }

/* ============ 审批时间线 ============ */
.tl { list-style: none; position: relative; padding-left: 24px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl li { position: relative; padding: 0 0 16px; }
.tl li:last-child { padding-bottom: 2px; }
.tl .dot {
  position: absolute; left: -24px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid #c9d4ea; display: flex; align-items: center; justify-content: center;
}
.tl li.ok .dot { border-color: var(--green); background: var(--green); }
.tl li.ok .dot::after { content: ""; width: 6px; height: 3px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(0, -1px); }
.tl li.no .dot { border-color: var(--red); background: var(--red); }
.tl li.no .dot::after { content: "×"; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }
.tl li.cur .dot { border-color: var(--orange); }
.tl li.cur .dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.tl .t-head { font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl .t-time { font-size: 11.5px; color: var(--text-3); font-weight: 400; }
.tl .t-cmt { font-size: 12.5px; color: var(--text-2); background: #f7f9fc; border-radius: 7px; padding: 6px 10px; margin-top: 5px; }

/* ============ 步骤条 ============ */
.steps { display: flex; gap: 0; margin-bottom: 6px; }
.step { flex: 1; text-align: center; position: relative; }
.step .s-dot {
  width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid #c9d4ea;
  color: var(--text-3); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; position: relative; z-index: 2;
}
.step.done .s-dot { background: var(--green); border-color: var(--green); color: #fff; }
.step.cur .s-dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px rgba(36,86,230,.14); }
.step .s-lbl { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.step.done .s-lbl { color: var(--green); font-weight: 600; }
.step.cur .s-lbl { color: var(--primary); font-weight: 600; }
.step::after { content: ""; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; background: var(--line); }
.step.done::after { background: var(--green); }
.step:last-child::after { display: none; }

/* ============ 详情信息栅格 ============ */
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.kv .k { font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.kv .v { font-size: 13.5px; font-weight: 500; word-break: break-all; }
.kv .v.money { font-size: 16px; font-weight: 700; color: var(--primary-dark); font-variant-numeric: tabular-nums; }

/* ============ 项目卡片 ============ */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.proj-card { padding: 18px; cursor: pointer; transition: transform .15s, box-shadow .15s; position: relative; }
.proj-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,31,60,.12); }
.proj-card h4 { font-size: 15px; margin-bottom: 6px; padding-right: 70px; }
.proj-card .code { font-family: Consolas, monospace; font-size: 12px; color: var(--text-3); }
.proj-card .badges { position: absolute; top: 16px; right: 16px; }
.proj-card .meta { color: var(--text-2); font-size: 12.5px; margin: 4px 0; }
.proj-card .amt { font-size: 17px; font-weight: 700; color: var(--primary-dark); margin: 10px 0 8px; }
.proj-card .amt small { font-size: 12px; color: var(--text-3); font-weight: 400; }
.node-dots { display: flex; gap: 6px; margin-top: 10px; }
.node-dot { flex: 1; text-align: center; }
.node-dot i { display: block; height: 5px; border-radius: 3px; background: var(--gray-bg); margin-bottom: 4px; }
.node-dot.has i { background: var(--green); }
.node-dot span { font-size: 10.5px; color: var(--text-3); display: block; line-height: 1.3; }

/* ============ 页签 ============ */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px; font-size: 13.5px; color: var(--text-2); cursor: pointer; border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent; margin-bottom: -2px; display: flex; gap: 6px; align-items: center; user-select: none;
}
.tab:hover { color: var(--primary); background: #f6f9ff; }
.tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.tab .n { background: var(--gray-bg); color: var(--text-2); font-size: 11px; border-radius: 8px; padding: 0 6px; }
.tab.active .n { background: var(--primary-light); color: var(--primary); }

/* ============ 页头 ============ */
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; }
.page-head .desc { color: var(--text-2); font-size: 13px; margin-top: 5px; }
.page-head .right { margin-left: auto; display: flex; gap: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 13px; cursor: pointer; margin-bottom: 8px; }
.back-link:hover { color: var(--primary); }

/* ============ 流程导航（工作台） ============ */
.flow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 14px; }
.flow-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; transition: all .15s; background: #fbfcfe; }
.flow-card:hover { border-color: var(--primary); background: #f6f9ff; }
.flow-card .fc-t { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.flow-card .fc-t svg { color: var(--primary); }
.flow-card .fc-d { font-size: 11.5px; color: var(--text-3); line-height: 1.7; }
.fc-arrow { color: #b6c2da; padding: 0 1px; }

/* ============ 待办 / 动态 ============ */
.todo-item { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px dashed var(--line); }
.todo-item:last-child { border-bottom: none; }
.todo-item .ti-main { flex: 1; min-width: 0; }
.todo-item .ti-t { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-item .ti-s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.todo-item .ti-ops { display: flex; gap: 6px; }
.todo-item .node-tag { background: var(--orange-bg); color: var(--orange); }
.act-item { display: flex; gap: 10px; padding: 9px 2px; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.act-item:last-child { border-bottom: none; }
.act-item .a-mod { flex: 0 0 auto; font-size: 11px; padding: 2px 8px; border-radius: 5px; background: var(--primary-light); color: var(--primary-dark); font-weight: 600; margin-top: 1px; }
.act-item .a-txt { font-size: 12.5px; color: var(--text-2); flex: 1; }
.act-item .a-time { font-size: 11px; color: var(--text-3); flex: 0 0 auto; margin-top: 2px; }
.dash-2col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin-top: 18px; }

/* ============ Toast / 灯箱 ============ */
#toast-root { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #101f3c; color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 9px;
  box-shadow: var(--shadow-lg); animation: toastIn .2s ease; max-width: 480px; display: flex; gap: 8px; align-items: center;
}
.toast.err { background: #b91c1c; }
.toast.ok { background: #14532d; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }
/* ============ 附件在线预览层 ============ */
#preview-root { position: fixed; inset: 0; z-index: 400; background: rgba(10, 16, 32, .87); display: none; flex-direction: column; }
#preview-root.show { display: flex; }
.pv-bar { display: flex; align-items: center; gap: 12px; padding: 11px 18px; background: rgba(16, 31, 60, .95); color: #e8eeff; flex: 0 0 auto; }
.pv-kind { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.16); flex: 0 0 auto; }
.pv-kind.k-pdf { background: #dc2626; }
.pv-kind.k-excel { background: #16a34a; }
.pv-kind.k-word { background: #2563eb; }
.pv-kind.k-video, .pv-kind.k-audio { background: #7c3aed; }
.pv-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.pv-btn { border: 1px solid rgba(255,255,255,.3); background: transparent; color: #e8eeff; font-size: 12.5px; padding: 5px 12px; border-radius: 7px; cursor: pointer; text-decoration: none; flex: 0 0 auto; font-family: inherit; }
.pv-btn:hover { background: rgba(255,255,255,.16); }
.pv-body { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 16px; }
.pv-body > * { margin: auto; }
.pv-img { max-height: calc(100vh - 130px); max-width: 100%; border-radius: 8px; background: #fff; }
.pv-frame { width: min(1100px, 100%); height: calc(100vh - 120px); border: none; border-radius: 8px; background: #fff; }
.pv-media { max-height: calc(100vh - 130px); max-width: 100%; border-radius: 8px; background: #000; }
.pv-audio { background: #fff; padding: 28px 34px; border-radius: 10px; text-align: center; }
.pv-audio-ico { font-size: 32px; color: var(--primary); margin-bottom: 12px; }
.pv-text { width: min(1000px, 100%); background: #fff; border-radius: 8px; padding: 18px; font-family: Consolas, "Courier New", monospace; font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-all; max-height: calc(100vh - 130px); overflow: auto; }
.pv-loading { color: #cdd7ee; font-size: 14px; padding: 40px; }
.pv-notice { background: #fff; border-radius: 10px; padding: 30px 40px; text-align: center; }
.pv-notice-t { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.pv-notice-d { color: var(--text-2); font-size: 13px; margin-bottom: 18px; }
.pv-sheetwrap { background: #fff; border-radius: 8px; width: min(1240px, 100%); overflow: hidden; }
.pv-tabs { display: flex; gap: 4px; padding: 10px 12px 0; flex-wrap: wrap; background: #fff; }
.pv-tab { border: 1px solid var(--line); border-bottom: none; background: #f5f7fb; font-size: 12.5px; padding: 6px 14px; border-radius: 7px 7px 0 0; cursor: pointer; color: var(--text-2); font-family: inherit; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-tab.active { background: #fff; color: var(--primary); font-weight: 600; border-color: var(--primary); }
.pv-sheet { background: #fff; overflow: auto; max-height: calc(100vh - 190px); }
.pv-table { border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.pv-table td { border: 1px solid #e8ecf4; padding: 5px 10px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.pv-table tr:first-child td { background: #f4f7fd; font-weight: 600; position: sticky; top: 0; }
.pv-cut { padding: 10px 14px; color: var(--orange); font-size: 12px; background: #fffaf0; border-top: 1px solid #f2e2c4; }
.pv-docx { background: #fff; padding: 18px; border-radius: 8px; width: min(1100px, 100%); max-height: calc(100vh - 130px); overflow: auto; }
.pv-docx .docx-wrapper { background: transparent; padding: 0; }
.pv-docx .docx-wrapper > section.docx { box-shadow: 0 1px 4px rgba(16,31,60,.12); margin-bottom: 12px; }
/* 附件类型色标 */
.att .thumb-pv { cursor: zoom-in; }
.att .thumb-pv:hover { box-shadow: 0 0 0 2px var(--primary) inset; }
.att .thumb .fchip { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; letter-spacing: .3px; border-radius: 7px; }
.f-pdf { background: #fdeaea; color: #dc2626; }
.f-excel { background: #e7f6ec; color: #16a34a; }
.f-word { background: #e8effd; color: #2563eb; }
.f-video, .f-audio { background: #f1eafd; color: #7c3aed; }
.f-text { background: #eef0f5; color: #5b6474; }
.f-other { background: #eef0f5; color: #8a93a6; }
.att .aops .pv-link { color: var(--primary); }
.att .aops .pv-link:hover { background: var(--primary-light); }

/* ============ 结算阶段面板 ============ */
.stage { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.stage-h { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: #f8fafd; border-bottom: 1px solid var(--line); }
.stage-h .s-no { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 22px; }
.stage-h .s-no.gray { background: #b9c2d4; }
.stage-h b { font-size: 13.5px; }
.stage-h .hint { font-size: 12px; color: var(--text-3); }
.stage-h .right { margin-left: auto; font-size: 12px; }
.stage-b { padding: 13px 14px; }
.stage.locked { opacity: .62; }
.stage .upzone { background: #fff; }

/* ============ 财务结算明细 ============ */
.fin-edit th, .fin-edit td { padding: 7px 8px; white-space: nowrap; }
.fin-edit td input { width: 100%; min-width: 84px; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font-size: 12.5px; outline: none; transition: border .15s, box-shadow .15s; background: #fff; }
.fin-edit td input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(36, 86, 230, .12); }
.fin-edit tfoot td { background: #f8fafd; }

/* ============ 登录 / 注册 / 用户管理 ============ */
.auth-hero { display: flex; align-items: center; justify-content: center; padding: 60px 0 30px; }
.auth-card {
  width: 520px; max-width: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 34px 36px; text-align: center;
}
.auth-card .auth-mark {
  width: 52px; height: 52px; border-radius: 13px; margin: 0 auto 14px;
  background: linear-gradient(135deg, #3b82f6, #2456e6); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.auth-card .auth-mark svg { width: 28px; height: 28px; }
.auth-card h2 { font-size: 18px; margin-bottom: 6px; }
.auth-card .auth-sub { color: var(--text-3); font-size: 13px; margin-bottom: 18px; }
.auth-tip {
  text-align: left; background: var(--primary-light); border: 1px solid #d4e0fc; color: var(--text-2);
  border-radius: 9px; padding: 11px 13px; font-size: 12.5px; line-height: 1.8;
}
.auth-tip a { font-weight: 600; }
.auth-ops { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
.auth-ops .btn { padding: 9px 26px; font-size: 14px; }
.auth-foot { margin-top: 16px; color: var(--text-3); font-size: 12px; }
.auth-manual {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 9px 16px;
  border: 1px dashed #b9c8e6; border-radius: 9px; background: #f7faff;
  color: var(--primary-dark); font-size: 12.5px; font-weight: 600;
}
.auth-manual:hover { border-color: var(--primary); background: var(--primary-light); }
.auth-manual svg { flex: 0 0 16px; }
a.manual-link { color: var(--text); display: inline-flex; align-items: center; gap: 5px; }
a.manual-link:hover { color: var(--primary); }
.sidebar-foot a.manual-link { color: #8fa6d8; font-size: 11.5px; }
.sidebar-foot a.manual-link:hover { color: #fff; }
.demo-acc { display: flex; flex-wrap: wrap; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; background: var(--primary-light); border: 1px solid #d4e0fc; border-radius: 999px; padding: 4px 12px 4px 5px; }
.user-chip .avatar { width: 28px; height: 28px; font-size: 12.5px; }
.user-chip .uc-info { line-height: 1.25; }
.user-chip .uc-info b { display: block; font-size: 12.5px; color: var(--primary-dark); }
.user-chip .uc-info span { font-size: 11px; color: var(--text-3); }
.cnt-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px;
  border-radius: 9px; background: #fff; color: var(--primary); font-size: 11px; font-weight: 700;
  padding: 0 4px; margin-left: 3px;
}
.us-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.us-row:last-child { border-bottom: none; }
.us-row .us-main { flex: 1; min-width: 260px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.us-row .us-main .sub { color: var(--text-3); font-size: 11.5px; }
.us-row .us-ops { display: flex; gap: 6px; align-items: center; }
.us-row select.us-sel { border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font-size: 12.5px; outline: none; background: #fff; color: var(--text); }

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .dash-2col { grid-template-columns: 1fr; }
}
/* ================= 移动端适配 ================= */
#nav-toggle { display: none; }
@media (min-width: 801px) { #nav-toggle { display: none !important; } }
#drawer-overlay { display: none; }
#drawer-overlay { display: none; }
@media (max-width: 800px) {
  #sidebar {
    display: flex; position: fixed; left: 0; top: 0; bottom: 0; z-index: 210;
    width: 272px; flex: 0 0 272px; transform: translateX(-102%);
    transition: transform .25s ease; box-shadow: 10px 0 36px rgba(8, 14, 30, .4); height: 100vh;
  }
  body.nav-open #sidebar { transform: translateX(0); }
  body.nav-open #drawer-overlay { display: block; position: fixed; inset: 0; z-index: 200; background: rgba(8, 14, 30, .5); animation: fadeIn .2s ease; }
  body.nav-open { overflow: hidden; }
  #nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: 1px solid var(--line); background: var(--card);
    border-radius: 10px; cursor: pointer; color: var(--text); flex: 0 0 38px;
  }
  #nav-toggle:active { background: var(--primary-light); }
  #topbar { padding: 0 14px; gap: 10px; }
  .top-sub { display: none; }
  .top-title { font-size: 15px; }
  .top-right > span { display: none !important; }
  .top-right .btn.sm.manual-link { display: none; }
  .user-chip .uc-info span { display: none; }
  #view { padding: 14px 12px 32px; }
  .form-grid, .kv { grid-template-columns: 1fr; }
  .toolbar { gap: 8px; }
  .toolbar .search { flex: 1 1 100%; width: auto; order: -1; }
  .dialog { width: 100% !important; border-radius: 14px; }
  .overlay { padding: 12px 10px; align-items: flex-start; }
  .dialog-b { padding: 16px 14px; max-height: none; }
  .dialog-f { padding: 12px 14px; flex-wrap: wrap; }
  .dialog-f .btn { flex: 1 1 auto; justify-content: center; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .tbl td, .tbl th { padding: 10px 12px; }
  .tbl .ops { white-space: normal; }
  .tbl .ops .btn.link { padding: 5px 8px; }
  .stat { padding: 13px 14px; }
  .stat .num { font-size: 20px; }
  .page-head h2 { font-size: 17px; }
  .page-head .right { width: 100%; margin-left: 0; }
  .page-head .right .btn { flex: 1 1 auto; justify-content: center; }
  .toast { max-width: 92vw; }
  #toast-root { top: 12px; width: 100%; padding: 0 12px; box-sizing: border-box; }
  .proj-card h4 { padding-right: 0; padding-top: 26px; }
  .flow-grid { grid-template-columns: 1fr; }
  .modal-root-padt { }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .auth-addr .old { display: none; }
  .auth-addr .arrow { display: none; }
}

/* 移动端顶栏防换行微调 */
@media (max-width: 800px) {
  .top-title { white-space: nowrap; }
  #topbar .btn.sm { padding: 5px 9px; font-size: 12px; }
  .user-chip { gap: 6px; }
  .user-chip .avatar { width: 28px; height: 28px; flex: 0 0 28px; font-size: 12px; }
}
