/* ===== 字体：思源黑体（中文）+ Inter（西文/数字），均为可变字体，一个文件覆盖全部字重 ===== */
@font-face {
  font-family: "Source Han Sans SC";
  src: url("/fonts/noto-sans-sc-var.woff2") format("woff2-variations"),
       url("/fonts/noto-sans-sc-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2-variations"),
       url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1c2b2d;
  --ink-soft: #52615f;
  --line: #dfdcd2;
  --line-strong: #cbc7ba;
  --paper: #f7f5ef;
  --card: #ffffff;
  --deep: #123f44;
  --deep-2: #1a555b;
  --gold: #b3843f;
  --gold-soft: #f0e6d2;
  --red: #a8442f;
  --red-soft: #f7e6e1;
  --green: #2f6b52;
  --green-soft: #e4efe8;
  --blue: #2b5b8a;
  --shadow: 0 1px 2px rgba(28, 43, 45, .05), 0 8px 24px -18px rgba(28, 43, 45, .35);
  --radius: 5px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.num, .money, td.num, th.num, .kpi-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.hidden { display: none !important; }

/* ---------------- 登录 ---------------- */
.login-shell {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(1200px 520px at 12% -10%, #e9e3d3 0%, transparent 60%),
    radial-gradient(900px 480px at 100% 100%, #dfe8e3 0%, transparent 55%),
    var(--paper);
}

.login-panel {
  width: min(460px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 34px 34px 26px;
  box-shadow: var(--shadow);
}

.login-brand { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 26px; }
.login-brand .mark { width: 44px; height: 44px; flex: none; }
.login-brand h1 { margin: 0 0 6px; font-size: 19px; letter-spacing: .5px; font-weight: 600; }
.login-brand p { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }

.login-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--ink-soft); }
.field input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
}
.field input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--deep-2);
  box-shadow: 0 0 0 3px rgba(26, 85, 91, .12);
}
input[type="date"] { min-height: 38px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
}
.btn:hover { border-color: var(--deep-2); color: var(--deep); }
.btn.primary { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn.primary:hover { background: var(--deep-2); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn.ghost:hover { background: #f1efe8; }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.btn.danger { color: var(--red); border-color: #e2c9c1; background: #fff; }
.btn.danger:hover { background: var(--red-soft); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.login-error {
  min-height: 18px;
  font-size: 12.5px;
  color: var(--red);
}

.login-hint {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink-soft);
}
.hint-title { margin-bottom: 8px; color: var(--ink); font-size: 12.5px; }
.hint-row { display: flex; justify-content: space-between; padding: 3px 0; }
.hint-row code { font-family: "Inter", "Source Han Sans SC", monospace; color: var(--deep); background: #f2f5f3; padding: 1px 6px; border-radius: 3px; }
.hint-note { margin-top: 10px; line-height: 1.6; color: #7a8580; }

/* ---------------- 布局 ---------------- */
.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100%; }
.nav-toggle { display: none; }
.nav-mask { display: none; }
.client-cards { display: none; }

.sidebar {
  background: var(--deep);
  color: #dfe9e7;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.side-brand { display: flex; gap: 10px; align-items: center; padding: 0 6px 20px; }
.side-brand .mark { width: 34px; height: 34px; flex: none; }
.side-brand-text strong { display: block; font-size: 15px; color: #fff; letter-spacing: 1px; }
.side-brand-text span { font-size: 11px; color: #93aaa7; letter-spacing: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group {
  font-size: 11px;
  color: #7f9a97;
  letter-spacing: 1.5px;
  margin: 14px 8px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 4px;
  color: #cfdcda;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: rgba(216, 192, 138, .14); color: #f2e7cf; border-left-color: #d8c08a; }
.nav-item .dot { width: 4px; height: 4px; border-radius: 50%; background: #7f9a97; }
.nav-item.active .dot { background: #d8c08a; }

/* 侧栏：一键全部展开 / 收起 */
.nav-tools { display: flex; justify-content: flex-end; padding: 0 4px 6px; }
.nav-all-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #8fa8a5;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.nav-all-toggle:hover { background: rgba(255, 255, 255, .07); color: #dfe9e7; }
.nav-all-toggle .fold-arrow { display: inline-block; font-size: 11px; line-height: 1; transition: transform .16s ease; }
.nav-all-toggle.closed .fold-arrow { transform: rotate(-90deg); }

/* 二级菜单：应收管理 */
.nav-fold { margin: 2px 0 2px; }
.nav-fold-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 4px;
  background: none;
  color: #cfdcda;
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.nav-fold-head:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-fold.active > .nav-fold-head { border-left-color: #d8c08a; color: #f2e7cf; }
.nav-fold-head .fold-arrow {
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  opacity: .75;
  transition: transform .16s ease;
}
.nav-fold.closed > .nav-fold-head .fold-arrow { transform: rotate(-90deg); }
.nav-fold-body { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px; }
.nav-fold.closed > .nav-fold-body { display: none; }
.nav-item.sub { padding-left: 30px; font-size: 13px; }
.nav-item.sub::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5d7572;
  flex: none;
}
.nav-item.sub.active::before { background: #d8c08a; }
.nav-item.sub .dot { display: none; }

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 4px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 14px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #d8c08a; color: #123f44;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; flex: none;
}
.side-user-text { flex: 1; min-width: 0; }
.side-user-text strong { display: block; font-size: 12px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.side-user-text span { font-size: 11px; color: #93aaa7; }
.icon-btn {
  background: transparent; border: none; color: #b8cac7; cursor: pointer;
  width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf6;
  position: sticky;
  top: 0;
  z-index: 20;
}
.page-title { font-size: 20px; font-weight: 600; letter-spacing: .5px; }
.page-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.book-switch { display: flex; align-items: center; gap: 8px; }
.book-label { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
#book-select { min-width: 180px; padding: 7px 10px; background: #fff; }
.topbar-date { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.content { padding: 22px 28px 40px; display: flex; flex-direction: column; gap: 18px; }

/* ---------------- 通用块 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.card-title { font-size: 14.5px; font-weight: 600; letter-spacing: .3px; }
.card-desc { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.toolbar input, .toolbar select { width: auto; min-width: 120px; padding: 7px 10px; }
.toolbar input[type="search"] { min-width: 200px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 15px 17px 13px;
  box-shadow: var(--shadow);
  position: relative;
}
.kpi-label { font-size: 12.5px; color: var(--ink-soft); display: flex; justify-content: space-between; align-items: center; }
.kpi-value { font-size: 25px; font-weight: 600; letter-spacing: -.3px; margin: 6px 0 2px; }
.kpi-value small { font-size: 12px; font-weight: 400; color: var(--ink-soft); margin-left: 4px; }
.kpi-foot { font-size: 11.5px; color: var(--ink-soft); }
.kpi.warn { border-top: 2px solid var(--gold); }
.kpi.alert { border-top: 2px solid var(--red); }
.kpi.alert .kpi-value { color: var(--red); }
.kpi.good { border-top: 2px solid var(--green); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 11.5px;
  line-height: 1.7;
  white-space: nowrap;
}
.tag.ar { background: #e7eff4; color: var(--blue); }
.tag.ap { background: #f4ece0; color: #8a5c22; }
.tag.open { background: #f2f0e8; color: #6b6552; }
.tag.partial { background: var(--gold-soft); color: #8a5c22; }
.tag.settled { background: var(--green-soft); color: var(--green); }
.tag.overdue { background: var(--red-soft); color: var(--red); }
.tag.role { background: #eef1ef; color: var(--ink-soft); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td {
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid #efedE4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
th {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  background: #fbfaf5;
  letter-spacing: .3px;
  border-bottom: 1px solid var(--line);
}
tr:hover td { background: #fbfaf6; }
td.num { text-align: right; }
th.num { text-align: center; }
td.wrap { white-space: normal; }
.empty {
  padding: 40px 18px;
  text-align: center;
  color: #8b938e;
  font-size: 13px;
}
.row-actions { display: flex; gap: 6px; }

/* ---------------- 图表 ---------------- */
.chart-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.chart-card .card-body { padding: 12px 16px 16px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.chart { width: 100%; display: block; }
.chart-empty { padding: 36px 0; text-align: center; color: #8b938e; font-size: 13px; }

.bar-list { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-track { height: 8px; background: #f0eee6; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.bar-fill { height: 100%; background: var(--deep-2); border-radius: 4px; }
.bar-fill.warn { background: var(--gold); }
.bar-fill.over { background: var(--red); }
.bar-amount { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------------- 表单 / 弹窗 ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-note { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(18, 32, 33, .42);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 18px; z-index: 60; overflow-y: auto;
}
.modal {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 24px 60px -24px rgba(18, 32, 33, .55);
  border: 1px solid var(--line);
}
.modal.wide { width: min(760px, 100%); }
.modal.wide.xl { width: min(980px, 100%); }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-body { padding: 18px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 13px 18px; border-top: 1px solid var(--line); background: #fbfaf6;
}
.error-text { color: var(--red); font-size: 12.5px; min-height: 18px; margin-top: 4px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 12px);
  background: var(--deep);
  color: #fff;
  padding: 10px 18px;
  border-radius: 5px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 80;
  max-width: 82vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #7d2f21; }

/* ---------------- 客户与供应商关联 ---------------- */
.stat-strip {
  display: flex; flex-wrap: wrap; gap: 18px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-soft);
}
.stat-strip b { color: var(--ink); }
.stat-warn, .stat-warn b { color: var(--gold); }

.cell-sub { display: block; font-size: 11px; color: #8b938e; line-height: 1.35; margin-top: 1px; }

.rel-cell { cursor: pointer; vertical-align: top; white-space: normal; word-break: break-all; }
.rel-cell:hover { background: #f6f4ec; }
.rel-empty { color: #a8a196; font-size: 12px; cursor: pointer; vertical-align: top; white-space: normal; }
.rel-empty:hover { background: #f6f4ec; color: var(--gold); }
td.client-name { white-space: normal; word-break: break-all; }
.rel-vendor { padding: 1px 0; word-break: break-all; }
.cell-actions { display: flex; gap: 6px; margin-top: 5px; }
.cell-actions .btn { padding: 2px 8px; font-size: 11.5px; }

.rel-current {
  border: 1px solid #e5e1d4; border-radius: 6px; background: #fbfaf5;
  padding: 10px 12px; margin-bottom: 14px;
}
.rel-current-title { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.rel-current-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 13px; border-top: 1px dashed #e5e1d4;
}
.rel-current-row:first-of-type { border-top: none; }
.rel-client-name { font-size: 13.5px; margin-bottom: 10px; }

.form-hint { grid-column: 1 / -1; font-size: 12px; color: #7b857f; line-height: 1.6; }
.card-note { padding: 12px 16px; font-size: 12.5px; color: #5f6a63; line-height: 1.75; }

/* ---------------- 其他 ---------------- */
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; }
.seg button {
  border: none; background: #fff; padding: 7px 14px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; color: var(--ink-soft); border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--deep); color: #fff; }

.mini-table { min-width: 620px; }
.mini-table td, .mini-table th { padding: 8px 10px; font-size: 12.5px; }

/* 操作列固定在右侧，宽表横向滚动时始终可点 */
.table-wrap table.sticky-actions th:last-child,
.table-wrap table.sticky-actions td:last-child {
  position: sticky;
  right: 0;
  background: #fff;
  z-index: 2;
  box-shadow: -10px 0 12px -12px rgba(28, 43, 45, .45);
}
.table-wrap table.sticky-actions th:last-child { background: #fbfaf5; }
.table-wrap table.sticky-actions tr:hover td:last-child { background: #fbfaf6; }

.split-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px;
  background: #f4f2ea;
  border: 1px solid #e5e1d4;
  border-radius: 6px;
  font-size: 12.5px;
  color: #5f6a63;
  line-height: 1.65;
}
.split-note .bar { width: 3px; align-self: stretch; background: var(--gold); border-radius: 2px; flex: none; }

.sum-line { display: flex; justify-content: flex-end; gap: 28px; padding: 12px 12px; font-size: 13px; border-top: 1px solid var(--line); }
.sum-line b { font-variant-numeric: tabular-nums; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }

  /* ---- 侧栏改成抽屉：默认收起，点顶栏 ☰ 滑出 ---- */
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 272px; max-width: 84vw; height: 100%;
    z-index: 90;
    transform: translateX(-104%);
    transition: transform .22s ease;
    box-shadow: 6px 0 26px rgba(8, 26, 24, .28);
    overflow-y: auto;
    padding: 16px 14px 14px;
  }
  body.nav-open .sidebar { transform: none; }
  .nav-mask {
    display: none; position: fixed; inset: 0; z-index: 80;
    background: rgba(9, 28, 26, .42);
  }
  body.nav-open .nav-mask { display: block; }
  .nav-toggle { display: inline-flex; }

  /* 抽屉内的导航恢复成竖向（可以折叠分组、可以用「全部展开」） */
  .side-brand { padding-bottom: 14px; }
  .nav { flex-direction: column; overflow: visible; gap: 2px; padding-bottom: 0; }
  .nav-tools { display: flex; }
  .nav-group { display: block; }
  .nav-fold { display: block; }
  .nav-fold-head {
    width: 100%; border-left: 2px solid transparent; border-bottom: none;
    padding: 9px 12px; text-align: left;
  }
  .nav-fold.active > .nav-fold-head { border-left-color: #d8c08a; border-bottom-color: transparent; }
  .nav-fold-head .fold-arrow { display: inline-block; }
  .nav-fold-body { display: flex; flex-direction: column; margin: 2px 0 4px; }
  .nav-fold.closed > .nav-fold-body { display: none; }
  .nav-item {
    flex: none; border-left: 2px solid transparent; border-bottom: none; padding: 9px 12px;
  }
  .nav-item.active { border-left-color: #d8c08a; border-bottom-color: transparent; }
  .nav-item.sub { padding-left: 30px; }
  .nav-item.sub::before { display: block; }
  .side-user { display: flex; }

  /* ---- 顶栏 ---- */
  .topbar { padding: 14px 16px; align-items: flex-start; flex-direction: column; gap: 10px; }
  .topbar-left { align-items: flex-start; gap: 10px; width: 100%; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .content { padding: 16px 14px 32px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }

  /* ---- 标签条：只留当前页，其余收进 ⋯ 菜单 ---- */
  .page-tab:not(.active) { display: none; }
  .page-tab.active { max-width: 62vw; }
  .tabs-more { position: relative; }
  .tabs-more[data-count]::after {
    content: attr(data-count);
    position: absolute; top: -4px; right: -2px;
    min-width: 14px; padding: 0 3px;
    border-radius: 8px; background: #d8c08a; color: #123f44;
    font-size: 9.5px; line-height: 14px; text-align: center;
  }

  /* ---- 客户档案：表格改为卡片 ---- */
  .client-cards { display: flex; flex-direction: column; gap: 10px; }
  .table-wrap.hide-narrow { display: none; }
  .stat-strip { flex-wrap: wrap; }
}

.client-card {
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: 11px 12px 10px;
}
.client-card.parent { border-left: 3px solid #d8c08a; }
.client-card .cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.client-card .cc-name { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.45; word-break: break-all; }
.client-card .cc-sub { font-size: 11.5px; color: #8b938e; margin-top: 2px; }
.client-card .cc-lv {
  flex: none; font-size: 11px; padding: 1px 7px; border-radius: 3px;
  background: #f3efe3; color: #6b5626; white-space: nowrap;
}
.client-card .cc-meta {
  display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 8px;
  font-size: 12px; color: var(--ink-soft);
}
.client-card .cc-meta b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.client-card .cc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.client-card .cc-acts { display: flex; gap: 8px; margin-top: 9px; }
.client-cards .empty-note { padding: 24px 4px; text-align: center; color: #8b938e; font-size: 13px; }

@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 22px; }
  .toolbar input[type="search"] { min-width: 100%; }
  .modal-mask { padding: 2vh 10px; }
}

/* ================= 表格显示调节：列宽 / 行高 / 字号 ================= */
/* 字号与行高统一走变量，所有表格（含弹窗内）都跟着变 */
#content table th, #content table td,
.modal table th, .modal table td {
  font-size: var(--tbl-fs, 13px);
  padding-top: var(--tbl-pad, 10px);
  padding-bottom: var(--tbl-pad, 10px);
}
#content table th, .modal table th { font-size: calc(var(--tbl-fs, 13px) - 1px); }

/* 迷你表格保持比主表略紧凑 */
#content table.mini-table th, #content table.mini-table td,
.modal table.mini-table th, .modal table.mini-table td {
  padding-top: max(2px, calc(var(--tbl-pad, 10px) - 2px));
  padding-bottom: max(2px, calc(var(--tbl-pad, 10px) - 2px));
}

#content table thead th, .modal table thead th { position: relative; }

.col-grip {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
  touch-action: none;
}
.col-grip::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: transparent;
  transition: background .12s;
}
.col-grip:hover::after { background: #c9a25a; }
body.col-resizing { cursor: col-resize; user-select: none; }
body.col-resizing .col-grip::after { background: #c9a25a; }

.display-panel {
  position: fixed;
  top: 64px;
  right: 20px;
  width: 236px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(28, 43, 40, .14);
  padding: 12px 14px;
  z-index: 60;
}
.display-panel.hidden { display: none; }
.dp-title { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.dp-row {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 0; font-size: 12.5px; color: var(--ink-soft);
}
.dp-row > span { width: 34px; flex: none; }
.dp-row b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink); }
.dp-row em { font-style: normal; font-size: 11.5px; }
.dp-step {
  width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 4px;
  background: #fff; color: var(--ink); font-size: 14px; line-height: 1; cursor: pointer;
}
.dp-step:hover { border-color: #c9a25a; color: #8a6a28; }
.dp-note { margin-top: 10px; font-size: 11.5px; color: #8b938e; line-height: 1.5; }

/* 窄屏：面板改为底部弹出，避免遮住左侧导航 */
@media (max-width: 760px) {
  .display-panel {
    left: 12px;
    right: 12px;
    width: auto;
    top: auto;
    bottom: 16px;
  }
}

/* 客户档案：母体学校/园 → 分校区 / 园区 */
.tree-mark { color: #b3a89a; }
.tree-child td { background: #faf8f3; }
.tree-parent td:first-child { font-weight: 600; }
/* 关联页：只做层级、不直接配货的母体 */
.rel-group-row .client-name { font-weight: 600; }
.rel-group { color: #a8a196; }

/* 客户 / 供应商档案：序号列 */
th.seq, td.seq { color: #8a9a96; font-variant-numeric: tabular-nums; }

/* 关联页：已配格子右上角的 × 解除按钮（只删这一条供货关系） */
.rel-vendor { position: relative; padding-right: 18px; }
.rel-vname { display: block; }
.rel-x { position: absolute; right: -2px; top: -2px; width: 15px; height: 15px; padding: 0;
  border: 0; border-radius: 3px; background: transparent; color: #bcb0a2; font-size: 13px;
  line-height: 15px; cursor: pointer; }
.rel-x:hover { background: #f1e3dd; color: #a8462f; }
.rel-x:disabled { opacity: .45; cursor: default; }

/* 可搜索下拉（往来单位等长列表选择） */
.combo { position: relative; }
.combo-input { width: 100%; }
.combo-list {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 240px; overflow-y: auto; background: #fff;
  border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 8px 22px rgba(28, 43, 45, 0.12); padding: 4px 0;
}
.combo-list.hidden { display: none; }
.combo-item { padding: 7px 11px; font-size: 13px; color: var(--ink); cursor: pointer; }
.combo-item:hover, .combo-item.active { background: #f2eee4; }
.combo-empty, .combo-more { padding: 8px 11px; font-size: 12px; color: #a8a196; }
.combo-more { border-top: 1px dashed var(--line); }

/* ---------------- 单据页分字段搜索 ---------------- */
.fld-bar { align-items: center; gap: 8px; }
.fld-label { font-size: 12.5px; color: #8b938e; }
.fld {
  min-width: 120px;
  max-width: 200px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.fld:focus { outline: none; border-color: #8fa79b; box-shadow: 0 0 0 2px rgba(143, 167, 155, .18); }

/* ---------------- 应收月度管理表 ---------------- */
/* 月度表金额到千万级时列宽按内容自适应，避免被省略号截断（整体可横向滚动） */
.ar-table { table-layout: auto; }
.ar-table td, .ar-table th { overflow: visible; text-overflow: clip; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.check input { margin: 0; }
.ar-who { vertical-align: middle; text-align: center; white-space: normal; word-break: break-all; border-right: 1px solid var(--line); }
.ar-who b { font-weight: 600; }
tbody tr.is-current-month td { background: #fbf7ea; }
tbody tr.sum-row td { background: #f5f2e9; font-weight: 600; border-top: 1px solid var(--line); }
tfoot tr.total-row td { background: #ece7d9; font-weight: 700; }


/* 应收管理表：两级分组表头 */
.ar-table thead tr.ar-group th {
  background: #e8ede9;
  border-bottom: 1px solid #c8d2ca;
  text-align: center;
  font-weight: 600;
  line-height: 1.35;
  padding: 6px 8px;
}
.ar-table thead tr.ar-sub th {
  background: #f1f5f1;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  padding: 5px 8px;
}
.ar-table .ar-date { font-size: 12.5px; color: #3f5247; }
.ar-table .ar-jump { color: #1f5c4a; text-decoration: none; border-bottom: 1px dashed #9db2a5; cursor: pointer; }
.ar-table .ar-jump:hover { color: #123f44; border-bottom-color: #123f44; background: #f2f6f0; }
.ar-table .ar-date sup { font-size: 10px; color: #8a6f2f; margin-left: 1px; }
.ar-table .ar-dash { color: #b9c0bb; }
.ar-table .ar-neg { color: #a8442a; }

.ar-table td, .ar-table th { white-space: nowrap; }
.ar-table td { padding-left: 7px; padding-right: 7px; }
/* 一格里可能有多张单据的日期（顿号隔开），允许折行，别被裁掉 */
.ar-table td.ar-dates { white-space: normal; word-break: normal; overflow-wrap: break-word; min-width: 168px; max-width: 230px; line-height: 1.5; }
.ar-table td.ar-dates .ar-date { white-space: normal; }

/* 表格显示被调整时的提示条 */
.ui-hint { display:flex; align-items:center; gap:10px; justify-content:flex-end; padding:4px 16px; background:#fbf6e6; border-bottom:1px solid #ecdfb4; font-size:12px; color:#7a6a3a; }
.ui-hint b { font-variant-numeric: tabular-nums; }
.ui-hint.hidden { display:none; }

/* 单元格框线：所有数据表显示完整网格线 */
.table-wrap table { border:1px solid #dcd8c9; }
table > thead > tr > th, table > tbody > tr > td, table > tfoot > tr > td { border:1px solid #e6e3d8; }
table > thead > tr > th { border-color:#d6d2c3; }
table > tbody > tr:last-child > td, table > tfoot > tr > td { border-bottom-color:#dcd8c9; }
table > thead > tr > th:first-child, table > tbody > tr > td:first-child { border-left-color:#dcd8c9; }
table > thead > tr > th:last-child, table > tbody > tr > td:last-child { border-right-color:#dcd8c9; }

/* 应收未收月表矩阵 */
.matrix-table th:first-child, .matrix-table td:first-child { position:sticky; left:0; z-index:2; background:#fff; }
.matrix-table thead th:first-child { z-index:3; background:#fbfaf5; }
.matrix-table tfoot td:first-child { background:#f7f5ee; }
.matrix-table tbody tr:hover td:first-child { background:#fbfaf6; }
.mx-name { max-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mx-amt { color:#8a5a3c; font-variant-numeric: tabular-nums; }
.matrix-table .mx-future { background:#faf9f4; color:#c3c1b8; }

/* 数据库环境角标（测试库在顶栏显红标） */
.env-tag { display:inline-flex; align-items:center; height:24px; padding:0 10px; border-radius:12px;
  font-size:12px; letter-spacing:.3px; background:#7a2f1e; color:#fff; border:1px solid #7a2f1e; }
/* 客户销售 / 供应商采购分析表：单位多选标签 */
.prt-chips { display:flex; flex-wrap:wrap; gap:6px; max-height:104px; overflow-y:auto; padding:4px 2px;
  border:1px solid var(--line); border-radius:var(--radius); background:#fbfaf5; }
.prt-chip { padding:4px 11px; font-size:12px; border-radius:14px; cursor:pointer; white-space:nowrap;
  background:#fff; border:1px solid var(--line-strong); color:var(--ink-soft); transition:all .15s; }
.prt-chip:hover { border-color:var(--green); color:var(--green); }
.prt-chip.on { font-weight:500; }
.prt-count { margin-left:auto; font-size:12px; color:#8b938e; }
.prt-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; vertical-align:middle; }
tbody tr.is-picked td { background:#f4f7f3; }
/* 其余导航分组：与应收/应付管理完全同一套样式（字号、颜色、内边距、高亮全部继承 .nav-fold-head） */
@media (max-width: 900px) {
  /* 抽屉导航里，其余分组和应收/应付一样，保留分组头、可折叠 */
  .nav-fold.fold-group { display: block; }
  .nav-fold.fold-group > .nav-fold-head { display: flex; }
  .nav-fold.fold-group.closed > .nav-fold-body { display: none; }
}

/* ================= 预算编制（年度资金预算汇总表模板） ================= */
.budget-card { overflow: hidden; }
.budget-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.budget-title .card-title { font-size:15px; letter-spacing:.2px; }
.budget-company {
  width:210px; height:30px; padding:0 9px; font-size:12.5px;
  border:1px solid var(--line); border-radius:var(--radius); background:#fff; color:var(--ink);
}
.budget-company:focus { border-color:var(--green); outline:none; }
.budget-tabs { display:flex; gap:6px; flex-wrap:wrap; padding:10px 16px 0; border-bottom:1px solid var(--line); }
.budget-tab {
  display:inline-flex; align-items:center; gap:7px; height:32px; padding:0 13px;
  font-size:12.5px; color:var(--ink-soft); background:#fbfaf5;
  border:1px solid var(--line); border-bottom:none; border-radius:6px 6px 0 0; cursor:pointer;
  transition:background .15s, color .15s;
}
.budget-tab:hover { background:#f4f1e6; color:var(--ink); }
.budget-tab.active { background:#fff; color:var(--green); font-weight:600; box-shadow:0 -1px 0 var(--green) inset; }
.bt-num {
  min-width:18px; height:17px; padding:0 5px; border-radius:9px; background:#eceae0;
  color:#7b7362; font-size:11px; line-height:17px; text-align:center; font-variant-numeric:tabular-nums;
}
.budget-tab.active .bt-num { background:#e2efe6; color:#1f5c4a; }

.budget-cover { display:flex; flex-wrap:wrap; gap:10px; padding:14px 16px 4px; }
.bc-item {
  flex:1 1 148px; min-width:140px; padding:9px 12px; border:1px solid var(--line);
  border-radius:var(--radius); background:#fbfaf5;
}
.bc-label { font-size:12px; color:#7b857f; margin-bottom:5px; }
.bc-value { font-size:17px; font-weight:600; color:var(--ink); font-variant-numeric:tabular-nums; line-height:1.1; }
.bc-value em { font-style:normal; font-size:11.5px; font-weight:400; color:#8b938e; margin-left:4px; }
.bc-value.bad { color:#a8442f; }

.budget-hint { padding:8px 16px 10px; font-size:12px; color:#8b938e; line-height:1.6; }

.budget-wrap { overflow:auto; max-height:calc(100vh - 300px); padding:0 16px 16px; }
.budget-table { border-collapse:collapse; width:auto; font-size:var(--tbl-fs, 13px); }
.budget-table th, .budget-table td {
  white-space:nowrap; padding-top:max(3px, calc(var(--tbl-pad, 10px) - 5px));
  padding-bottom:max(3px, calc(var(--tbl-pad, 10px) - 5px));
}
.budget-table thead th { background:#f6f4ea; font-weight:600; text-align:center; vertical-align:middle; }
.budget-table thead th.q { background:#eef1e7; color:#43564a; font-weight:600; }
.budget-table thead tr:last-child th { background:#faf8ef; font-weight:500; }
.budget-table thead th.num, .budget-table thead th.q { text-align:center; }
.budget-table td { vertical-align:middle; }
.budget-table td.num { text-align:right; font-variant-numeric:tabular-nums; padding-left:7px; padding-right:7px; }
.budget-table th.num { padding-left:7px; padding-right:7px; }
.budget-table .b-seq { text-align:center; color:#7b857f; background:#fbfaf5; position:sticky; left:0; z-index:2; }
.budget-table thead th:first-child { position:sticky; left:0; z-index:3; background:#f6f4ea; }
.budget-table td.b-text { cursor:text; max-width:280px; overflow:hidden; text-overflow:ellipsis; }
.budget-table td.b-text:hover { background:#f6f9f4; box-shadow:inset 0 0 0 1px #d5e2d6; }
.budget-table td.b-amt { cursor:text; color:#3c4a43; }
.budget-table td.b-amt:hover { background:#f6f9f4; box-shadow:inset 0 0 0 1px #d5e2d6; }
.budget-table td.b-amt.is-zero { color:#c6c3b8; }
.budget-table td.b-total { font-weight:600; background:#fbfaf5; }
.budget-table td.b-ops { text-align:center; }
.budget-table tbody tr:hover td { background:#fcfbf6; }
.budget-table tbody tr:hover td.b-seq { background:#f6f5ed; }
.budget-table tfoot td { position:sticky; bottom:0; background:#ece7d9; font-weight:700; z-index:2; padding-left:7px; padding-right:7px; }
.budget-table tfoot td.num { text-align:right; font-variant-numeric:tabular-nums; }
.budget-table tfoot td:first-child { z-index:3; }
.b-edit {
  width:100%; height:100%; min-height:22px; padding:0 4px; font-size:inherit; font-family:inherit;
  border:1px solid var(--green); border-radius:3px; background:#fff; color:var(--ink); outline:none;
}
.b-edit.num { text-align:right; font-variant-numeric:tabular-nums; }
.b-edit.b-edit-select { padding:0 2px; }
/* 预算表区域选择（对齐 Excel 的选区观感） */
.budget-table:focus { outline:none; }
.budget-table td.b-sel { background:#e3efe8 !important; box-shadow:inset 0 0 0 1px #2f7d6b !important; }
.budget-table thead th { user-select:none; }
.budget-table tbody td { user-select:none; }

/* 预算分析：卡片内搜索框与筛选标签 */
.ba-search-wrap { display: inline-flex; align-items: center; gap: 7px; }
.toolbar .ba-search { width: 150px; min-width: 0; padding: 6px 9px; font-size: 12.5px; }
.ba-count { font-size: 11.5px; color: #7d8885; white-space: nowrap; }
.ba-flabel { font-size: 12px; color: #52615f; }
.card-head .toolbar { row-gap: 6px; }

/* 客户销售 / 供应商采购分析表：列按内容自适应，金额不省略，必要时整体横向滚动 */
.prt-table { table-layout: auto; width: 100%; }
.prt-table th, .prt-table td { white-space: nowrap; }
.prt-table td.wrap, .prt-table th:nth-child(2) { white-space: normal; min-width: 150px; }
.prt-table .cell-sub { white-space: normal; }

/* 预算分析：一表一页 tab 区（复用预算编制 .budget-tabs 样式） */
.ba-tabs { flex-wrap: nowrap; overflow-x: auto; }
.ba-tabs .budget-tab { flex: 0 0 auto; padding: 0 10px; gap: 5px; }
#ba-body { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 16px; }
.chart-grid-1 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (max-width: 760px) {
  #ba-body { padding: 12px; }
}

/* 预算分析明细表：列自适应，金额与占比不省略 */
.ba-dt { table-layout: auto; width: 100%; }
.ba-dt th, .ba-dt td { white-space: nowrap; }
.ba-dt td.wrap { min-width: 132px; white-space: normal; }

/* 预算分析：五类构成表列多，压缩左右内边距以免横向滚动 */
.ba-cats-tbl th, .ba-cats-tbl td { padding-left: 7px; padding-right: 7px; }

/* ---------------- 平台内多标签 ---------------- */
.page-tabs-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: #f5f8f7;
  border-bottom: 1px solid #e3eae7;
  flex: none;
}
.page-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 0;
  background: none;
  border-bottom: 0;
}
.tabs-more {
  flex: none;
  width: 28px;
  height: 26px;
  border: 1px solid #dfe7e3;
  border-radius: 6px;
  background: #fff;
  color: #41514d;
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.tabs-more:hover { border-color: #123f44; color: #123f44; }
.tabs-menu {
  position: absolute;
  right: 12px;
  top: calc(100% + 2px);
  z-index: 60;
  min-width: 174px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border: 1px solid #dfe7e3;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(18, 63, 68, .16);
}
.tabs-menu button {
  border: 0;
  background: none;
  padding: 7px 10px;
  border-radius: 5px;
  text-align: left;
  font: inherit;
  font-size: 12.5px;
  color: #41514d;
  cursor: pointer;
}
.tabs-menu button:hover { background: #eef4f2; color: #123f44; }
.page-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid #dfe7e3;
  border-radius: 6px;
  background: #fff;
  color: #41514d;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.page-tab.active { border-color: #123f44; background: #123f44; color: #fff; }
.page-tab em { font-style: normal; opacity: .65; padding: 0 2px; }
.page-tab em:hover { opacity: 1; }
.budget-scope {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  background: #eef4f2;
  color: #123f44;
  font-size: 12.5px;
}

/* ---- 角色与权限：权限点矩阵 ---- */
.perm-matrix {
  display: grid;
  gap: 10px;
  max-height: 440px;
  overflow: auto;
  padding-right: 4px;
}
.perm-group {
  border: 1px solid #e3e8e5;
  border-radius: 8px;
  padding: 8px 12px 10px;
  background: #fafbfa;
}
.perm-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
  color: #2f3a36;
}
.perm-all {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #52615f;
  font-weight: 400;
  cursor: pointer;
}
.perm-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 5px 14px;
}
.perm-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #33423d;
  cursor: pointer;
}
.perm-item em {
  color: #98a29d;
  font-style: normal;
  font-size: 11px;
}

/* ---- 部门负责人多选 ---- */
.leader-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 5px 14px;
  max-height: 210px;
  overflow: auto;
  border: 1px solid #e3e8e5;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fafbfa;
}
.leader-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #33423d;
  cursor: pointer;
}
.leader-item em {
  color: #98a29d;
  font-style: normal;
  font-size: 11px;
}

/* ---- 批量选择条 ---- */
.sel-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 10px;
  background: #eef4f1;
  border: 1px solid #d7e4dd;
  border-radius: 8px;
  font-size: 12.5px;
  color: #2f6b53;
}

/* 权限矩阵对齐修正：勾选框与文字左对齐、标签不换行 */
.perm-item { align-items: flex-start; text-align: left; }
.perm-item input { margin-top: 2px; flex: none; }
.perm-item span { flex: 1; text-align: left; line-height: 1.45; }
.perm-all, .perm-all span, .perm-all label { white-space: nowrap; }
.leader-item { align-items: flex-start; text-align: left; }
.leader-item input { margin-top: 2px; flex: none; }
.leader-item span { flex: 1; text-align: left; line-height: 1.45; }
/* 勾选框不要被 .field input 的 width:100% 撑开 */
.perm-item input[type="checkbox"],
.leader-item input[type="checkbox"],
table input[type="checkbox"],
.sel-bar input[type="checkbox"] {
  width: auto;
  min-width: 0;
  padding: 0;
  margin: 0 3px 0 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  flex: none;
}
/* 部门、账号两张表按列宽百分比固定分配，不再横向滚动 */
.fixed-table { table-layout: fixed; width: 100%; }
.fixed-table td, .fixed-table th { overflow: hidden; text-overflow: ellipsis; }
.fixed-table td.wrap { white-space: normal; }
.fixed-table .row-actions { flex-wrap: wrap; gap: 4px; }
/* 固定列宽表格：收紧内边距，避免窄容器下表头被省略号截断 */
.fixed-table th, .fixed-table td { padding-left: 6px; padding-right: 6px; }
.fixed-table .tag { padding: 2px 6px; }

/* ---- 权限矩阵：总全选条 + 逐点详细说明 ---- */
.perm-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 10px;
  background: #f5f3eb; border: 1px solid #e6e1d2; border-radius: 8px;
}
.perm-master { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #1c2b2d; cursor: pointer; }
.perm-master input[type="checkbox"] { width: auto; min-width: 0; padding: 0; border: 0; }
.perm-count { font-size: 12px; color: #6b7873; }
.perm-count b { color: #1c2b2d; font-size: 13px; }
.perm-hint { font-size: 12px; color: #97a29c; }
.perm-group-head { gap: 8px; }
.perm-group-meta { font-size: 11.5px; color: #97a29c; margin-left: auto; }
.perm-items { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.perm-item-body { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.perm-item-top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.perm-item-name { font-size: 13px; font-weight: 600; color: #24332f; }
.perm-code { font-style: normal; font-size: 11px; color: #a3ada7; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.perm-item-desc { font-size: 12px; color: #6b7873; line-height: 1.5; }
@media (max-width: 720px) { .perm-items { grid-template-columns: 1fr; } }
/* 预算编制：右上角自定义新增行数 */
.budget-add-n{width:64px;height:28px;padding:2px 6px;border:1px solid #d5ddd9;border-radius:6px;font-size:13px;text-align:center;background:#fff}
.budget-add-n:focus{outline:none;border-color:#2f7d6b}

/* 宽屏不显示手机端菜单按钮（覆盖 .icon-btn 的 display 设置） */
@media (min-width: 901px) {
  .nav-toggle { display: none !important; }
  .nav-mask { display: none !important; }
}

/* ================= 说明 / 口径类提示条：全部隐藏 ================= */
/* 覆盖：应收表、应付表、应收未收月表、应付未付月表、收支对比、账龄、工作台口径条，以及「说明」卡片 */
.split-note,
.card-note { display: none !important; }
.card:has(> .card-note) { display: none !important; }


/* 应收期初表：固定列宽，日期列不折行 */
.ao-table{table-layout:fixed}
.ao-table th,.ao-table td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 期初导入预览：档案匹配状态 */
.ok-text{color:#2f6b46;font-weight:600}
.warn-text{color:#a86a12;font-weight:600}
.new-text{color:#a8442f;font-weight:600}
