/* 页面级样式 */

/* ————— 工作台 ————— */
.hero-overline {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--gold-deep);
  margin-bottom: 12px;
}
.hero-overline::after { content: ""; width: 32px; height: 1px; background: var(--gold-2); }

.chart-headline { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.chart-total { display: flex; align-items: baseline; gap: 8px; }
.chart-total b { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.chart-total span { font-size: 10px; color: var(--muted); }
.chart-legend-note { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--muted); }
.chart-legend-note i { width: 18px; height: 2px; background: var(--gold); display: inline-block; }
.chart-legend-note i.dashed { background: none; border-top: 1px dashed var(--line-2); height: 0; }

.todo-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid #f0e8db;
}
.todo-item:last-child { border-bottom: 0; padding-bottom: 0; }
.todo-item .avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 11px; }
.todo-item .grow { min-width: 0; }
.todo-item .t { font-size: 11.5px; color: var(--ink); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-item .m { margin-top: 2px; font-size: 9px; color: var(--muted); display: flex; gap: 7px; }
.todo-item .amt { font-family: var(--serif); font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.todo-item .urgent { color: var(--wine); }

.expiring-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0e8db;
}
.expiring-item:last-child { border-bottom: 0; padding-bottom: 0; }
.date-block {
  width: 40px;
  padding: 5px 0 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
  background: var(--card-2);
  line-height: 1.2;
}
.date-block b { display: block; font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); }
.date-block span { display: block; font-size: 7.5px; letter-spacing: 0.06em; color: var(--muted); }
.expiring-item .t { font-size: 11.5px; color: var(--ink); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expiring-item .m { margin-top: 2px; font-size: 9px; color: var(--muted); }
.days-left { font-size: 9px; white-space: nowrap; padding: 3px 7px; border-radius: 4px; background: var(--wine-wash); color: var(--wine); }
.days-left--calm { background: #f2eee5; color: var(--muted); }

.feed-item { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; padding-bottom: 15px; }
.feed-item:last-child { padding-bottom: 0; }
.feed-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: -2px;
  width: 1px;
  background: #eee5d7;
}
.feed-item:last-child::before { display: none; }
.feed-dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; border: 1px solid var(--gold-2); background: var(--gold-wash); }
.feed-item .t { font-size: 10.5px; color: var(--ink-3); line-height: 1.65; }
.feed-item .t b { font-weight: 500; color: var(--ink-2); }
.feed-item .time { margin-top: 2px; font-size: 8.5px; color: var(--faint); }

.node-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 4px;
}
.node {
  position: relative;
  padding: 0 16px;
  border-left: 1px solid var(--line);
}
.node:first-child { border-left: 0; padding-left: 0; }
.node .n-date { font-size: 9px; color: var(--faint); letter-spacing: 0.08em; }
.node .n-title { margin-top: 4px; font-size: 11px; color: var(--ink-2); line-height: 1.5; }
.node .n-meta { margin-top: 5px; font-size: 9px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.node .n-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.node.is-urgent .n-dot { background: var(--wine); }
.node.is-done { opacity: 0.62; }
.node.is-done .n-title { text-decoration: line-through; text-decoration-color: var(--line-2); }

/* ————— 合同台账 ————— */
.list-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.summary-item { display: flex; align-items: baseline; gap: 6px; font-size: 10.5px; color: var(--muted); }
.summary-item b { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); }
.summary-item i { font-style: normal; width: 5px; height: 5px; border-radius: 50%; }
.summary-div { width: 1px; height: 18px; background: var(--line); }
.filter-divider { width: 1px; height: 38px; background: var(--line); margin: 0 2px; align-self: flex-end; }
.filter-actions { margin-left: auto; display: flex; gap: 7px; align-self: flex-end; }
.filter-more {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 11px;
  font-size: 10.5px;
  color: var(--muted);
  border-radius: 8px;
}
.filter-more:hover { background: var(--gold-wash); color: var(--gold-deep); }
.filter-more .ico { width: 13px; height: 13px; }
.active-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.active-filters .lbl { font-size: 9px; color: var(--faint); letter-spacing: 0.06em; }
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--card);
  font-size: 9px;
  color: var(--ink-3);
}
.filter-tag button { color: var(--faint); font-size: 12px; line-height: 1; }
.filter-tag button:hover { color: var(--wine); }
.table-progress { min-width: 94px; }
.table-person { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.table-person .avatar { width: 23px; height: 23px; flex-basis: 23px; font-size: 9px; }
.amount-split { display: flex; flex-direction: column; gap: 2px; }
.amount-split span { font-size: 8.5px; color: var(--faint); }

/* ————— 合同详情 ————— */
.detail-head {
  position: relative;
  padding: 26px 30px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(70% 160% at 100% 0%, rgba(231, 214, 184, 0.38), transparent 60%),
    linear-gradient(120deg, #fdfaf3, #f7efe1);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 18px;
}
.detail-head::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -90px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(169, 130, 78, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(169, 130, 78, 0.03), 0 0 0 55px rgba(169, 130, 78, 0.02);
}
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; position: relative; z-index: 1; }
.detail-kicker { display: flex; align-items: center; gap: 8px; font-size: 9.5px; letter-spacing: 0.16em; color: var(--gold-deep); }
.detail-kicker .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold-2); }
.detail-title { margin-top: 9px; font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.45; letter-spacing: 0.01em; max-width: 820px; }
.detail-tags { margin-top: 11px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.detail-meta { margin-top: 13px; display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; font-size: 10px; color: var(--muted); }
.detail-meta b { font-weight: 500; color: var(--ink-2); }
.detail-meta .sep { width: 1px; height: 11px; background: var(--line-2); }
.detail-amount { text-align: right; position: relative; z-index: 1; flex: 0 0 auto; }
.detail-amount span { font-size: 9px; letter-spacing: 0.16em; color: var(--muted); }
.detail-amount b { display: block; margin-top: 3px; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.detail-amount small { font-size: 10px; color: var(--muted); font-family: var(--sans); }
.detail-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; justify-content: flex-end; position: relative; z-index: 1; }
.detail-tabs { margin-top: 20px; position: relative; z-index: 1; }
.detail-tabs .tab { height: 46px; }
.panel { display: none; }
.panel.is-active { display: block; animation: fadeUp 0.35s var(--ease); }
.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}
.section-title .bar { width: 3px; height: 14px; background: var(--gold-2); }
.section-title .aside { margin-left: auto; font-family: var(--sans); font-size: 9.5px; color: var(--faint); font-weight: 400; letter-spacing: 0.06em; }
.party-block { text-align: center; padding: 4px 0 12px; }
.party-logo {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-3);
  border-radius: 50%;
  background: var(--gold-wash);
  font-family: var(--serif);
  font-size: 20px;
  color: var(--gold-deep);
}
.party-name { font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--ink); }
.party-tags { margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.party-rows { margin-top: 12px; border-top: 1px solid #f0e8db; }
.party-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f7f1e5; font-size: 9.5px; }
.party-row:last-child { border-bottom: 0; }
.party-row span { color: var(--faint); flex: 0 0 auto; }
.party-row b { font-weight: 400; color: var(--ink-3); text-align: right; word-break: break-all; }

.countdown {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0 2px;
}
.countdown .ring { width: 84px; height: 84px; flex-basis: 84px; }
.countdown .ring-center b { font-size: 23px; }
.countdown-info .k { font-size: 9px; color: var(--muted); letter-spacing: 0.08em; }
.countdown-info .v { margin-top: 2px; font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); }
.countdown-info .d { margin-top: 3px; font-size: 9px; color: var(--wine); }
.countdown-info .d.calm { color: var(--muted); }

.pay-table td { font-size: 10.5px; }
.pay-table .amount { font-size: 11.5px; }
.risk-item { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px solid #f5eee3; }
.risk-item:last-child { border-bottom: 0; padding-bottom: 0; }
.risk-flag { width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border-radius: 50%; background: var(--wine-wash); color: var(--wine); font-size: 9px; font-family: var(--serif); }
.risk-flag--gold { background: var(--gold-wash); color: var(--gold-deep); }
.risk-item .t { font-size: 10px; color: var(--ink-2); line-height: 1.6; }
.risk-item .m { margin-top: 2px; font-size: 8.5px; color: var(--faint); }

.attach-list { display: flex; flex-direction: column; gap: 7px; }
.contract-doc { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.doc-side .card + .card { margin-top: 18px; }

.change-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f0e8db; }
.change-item:last-child { border-bottom: 0; }
.change-item .ver {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold-3);
  background: var(--gold-wash);
  font-family: var(--serif);
  font-size: 10px;
  color: var(--gold-deep);
}
.change-item .t { font-size: 11.5px; color: var(--ink); }
.change-item .m { margin-top: 3px; font-size: 9px; color: var(--muted); line-height: 1.7; }

/* ————— 起草 ————— */
.draft-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.draft-main { min-width: 0; }
.wizard-card { padding: 24px 26px; }
.wizard-body { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.step-panel { display: none; }
.step-panel.is-active { display: block; animation: fadeUp 0.4s var(--ease); }
.step-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.step-intro h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.step-intro p { margin-top: 4px; font-size: 10.5px; color: var(--muted); line-height: 1.8; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid .span-1 { grid-column: span 1; }
.form-section-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  padding-bottom: 7px;
  border-bottom: 1px solid #f0e8db;
  font-family: var(--serif);
  font-size: 12.5px;
  color: var(--ink-2);
}
.form-section-title .num { font-size: 9px; color: var(--gold); letter-spacing: 0.1em; }
.form-section-title:first-child { margin-top: 0; }
.draft-actions { display: flex; align-items: center; gap: 9px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.draft-actions .spacer { flex: 1; }
.template-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.template-pick .doc-mini { height: 112px; }
.draft-summary { position: sticky; top: calc(var(--topbar) + 18px); }
.summary-dark {
  position: relative;
  padding: 20px;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, #22352c, #15211b 82%);
  color: #e9dfcc;
  overflow: hidden;
  border: 1px solid rgba(198, 168, 118, 0.24);
}
.summary-dark::after {
  content: "契";
  position: absolute;
  right: -18px;
  bottom: -34px;
  font-family: var(--serif);
  font-size: 150px;
  color: rgba(198, 168, 118, 0.07);
  line-height: 1;
}
.summary-dark .s-label { font-size: 8.5px; letter-spacing: 0.24em; color: rgba(233, 220, 196, 0.48); }
.summary-dark .s-title { margin-top: 7px; font-family: var(--serif); font-size: 15px; font-weight: 600; line-height: 1.55; color: #f5ecdc; }
.summary-dark .s-rows { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(198, 168, 118, 0.18); position: relative; z-index: 1; }
.s-row { display: flex; justify-content: space-between; gap: 10px; font-size: 9.5px; padding: 5px 0; color: rgba(233, 220, 196, 0.55); }
.s-row b { font-weight: 400; color: #e9dfcc; text-align: right; }
.s-row b.gold { color: var(--gold-2); font-family: var(--serif); font-size: 11px; }
.summary-dark .s-progress { margin-top: 14px; position: relative; z-index: 1; }
.summary-dark .s-progress .row { justify-content: space-between; font-size: 8.5px; color: rgba(233, 220, 196, 0.48); margin-bottom: 6px; }
.summary-dark .progress { background: rgba(255, 255, 255, 0.1); height: 3px; }
.summary-dark .progress i { background: linear-gradient(90deg, #8f6f42, var(--gold-2)); }
.draft-tips { margin-top: 16px; }
.tip-item { display: flex; gap: 9px; padding: 7px 0; font-size: 9.5px; color: var(--muted); line-height: 1.75; }
.tip-item .n { flex: 0 0 16px; width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; font-family: var(--serif); font-size: 8px; color: var(--gold-deep); margin-top: 1px; }
.draft-recent { margin-top: 4px; }
.draft-recent .list-item { padding: 9px 0; }
.draft-recent .list-title { font-size: 10.5px; }

.clause-list { display: flex; flex-direction: column; gap: 8px; }
.clause-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  transition: all 0.16s;
}
.clause-item:hover { border-color: var(--gold-3); }
.clause-item.is-on { background: var(--gold-wash); border-color: var(--gold-3); }
.clause-item .drag { color: var(--faint); font-size: 11px; letter-spacing: 1px; cursor: grab; }
.clause-item .grow b { display: block; font-size: 10.5px; font-weight: 500; color: var(--ink-2); }
.clause-item .grow span { display: block; margin-top: 1px; font-size: 9px; color: var(--muted); }
.clause-item .check { margin-left: auto; }
.clause-item .add-clause { font-size: 9px; color: var(--gold-deep); white-space: nowrap; }
.clause-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.file-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-2);
  font-size: 10px;
  color: var(--ink-3);
}
.file-row .ico { width: 13px; height: 13px; color: var(--gold); }
.file-row .x { margin-left: auto; color: var(--faint); font-size: 11px; }
.file-row .x:hover { color: var(--wine); }

.flow-preview { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.flow-preview-node {
  position: relative;
  flex: 1;
  min-width: 132px;
  padding: 16px 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  text-align: center;
}
.flow-preview-node + .flow-preview-node { margin-left: 26px; }
.flow-preview-node + .flow-preview-node::before {
  content: "→";
  position: absolute;
  left: -21px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-2);
  font-size: 12px;
}
.fp-avatar { margin: 0 auto 8px; }
.fp-name { font-size: 10.5px; font-weight: 500; color: var(--ink-2); }
.fp-role { margin-top: 2px; font-size: 8.5px; color: var(--muted); }
.fp-tag { margin-top: 7px; display: inline-block; padding: 1px 6px; border-radius: 3px; background: var(--sage-wash); color: var(--sage); font-size: 8px; }
.fp-tag--wait { background: var(--gold-wash); color: var(--gold-deep); }
.condition-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px dashed var(--gold-3);
  border-radius: 9px;
  background: #fdf8ee;
  font-size: 10px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.condition-box .k { color: var(--faint); font-size: 9px; }
.condition-box .v { padding: 2px 7px; border-radius: 4px; background: var(--card); border: 1px solid var(--line); font-size: 9.5px; color: var(--gold-deep); }

.review-grid { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.review-side .card + .card { margin-top: 14px; }
.review-checks { display: flex; flex-direction: column; gap: 11px; }
.review-check { display: flex; align-items: flex-start; gap: 9px; font-size: 10px; color: var(--muted); line-height: 1.7; }
.review-check b { color: var(--ink-2); font-weight: 500; }

/* ————— 审批 ————— */
.approval-stats { display: flex; gap: 0; flex-wrap: wrap; padding: 4px 0 0; }
.ap-stat { flex: 1; min-width: 120px; padding: 0 20px; border-left: 1px solid var(--line); }
.ap-stat:first-child { border-left: 0; padding-left: 0; }
.ap-stat span { font-size: 9px; letter-spacing: 0.1em; color: var(--muted); }
.ap-stat b { display: block; margin-top: 4px; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); }
.ap-stat b em { font-style: normal; font-size: 9px; color: var(--muted); font-family: var(--sans); margin-left: 3px; }
.ap-stat small { display: block; margin-top: 2px; font-size: 8.5px; color: var(--faint); }
.approval-doc-note { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; background: #fdf8ee; border: 1px solid #f0e4cf; font-size: 9.5px; color: var(--gold-deep); }

/* ————— 签署 ————— */
.sign-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr); gap: 0; overflow: hidden; }
.sign-hero-main { padding: 26px 28px; }
.sign-hero-side {
  padding: 24px;
  background: linear-gradient(150deg, #22352c, #15211b);
  color: #e9dfcc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-left: 1px solid rgba(198, 168, 118, 0.22);
}
.sign-hero-side .seal-print { border-color: rgba(233, 220, 196, 0.4); color: rgba(233, 220, 196, 0.6); box-shadow: inset 0 0 0 4px rgba(233, 220, 196, 0.08); }
.sign-hero-side .cap { font-size: 9px; letter-spacing: 0.18em; color: rgba(233, 220, 196, 0.45); }
.sign-steps { display: flex; align-items: center; gap: 0; margin-top: 20px; }
.sign-step { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 9.5px; color: var(--muted); }
.sign-step .n { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; font-family: var(--serif); font-size: 8px; }
.sign-step.is-done .n { background: var(--gold-wash); border-color: var(--gold-2); color: var(--gold-deep); }
.sign-step + .sign-step::before { content: ""; width: 14px; height: 1px; background: var(--line); margin-right: 8px; }
.sign-progress { margin-top: 18px; }
.sign-progress .row { justify-content: space-between; font-size: 9px; color: var(--muted); margin-bottom: 6px; }
.sign-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.sign-meta div { font-size: 9px; color: var(--muted); }
.sign-meta b { display: block; margin-top: 2px; font-family: var(--serif); font-size: 13px; color: var(--ink); font-weight: 500; }
.kanban-scroll { overflow-x: auto; padding-bottom: 4px; }
.kanban-scroll .kanban { min-width: 980px; }

/* ————— 履约 ————— */
.gantt { width: 100%; overflow-x: auto; }
.gantt-inner { min-width: 720px; }
.gantt-head { display: grid; grid-template-columns: 190px repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.gantt-head span { font-size: 9px; color: var(--faint); text-align: center; letter-spacing: 0.06em; }
.gantt-head span:first-child { text-align: left; padding-left: 4px; }
.gantt-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 0; border-bottom: 1px solid #f3ebdf; padding: 11px 0; }
.gantt-row:last-child { border-bottom: 0; }
.gantt-name { padding-left: 4px; min-width: 0; }
.gantt-name b { display: block; font-size: 10px; font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-name span { font-size: 8px; color: var(--faint); }
.gantt-track { position: relative; height: 22px; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(16.66% - 1px), #eee6d8 calc(16.66% - 1px), #eee6d8 16.66%); }
.gantt-bar {
  position: absolute;
  top: 4px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #cfb68c, #a9824e);
  opacity: 0.9;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 7.5px;
  color: #fffaf0;
  white-space: nowrap;
  overflow: hidden;
}
.gantt-bar--sage { background: linear-gradient(90deg, #9db3a3, #5f7a66); }
.gantt-bar--clay { background: linear-gradient(90deg, #c49b87, #aa6a4e); }
.gantt-bar--ghost { background: repeating-linear-gradient(45deg, #ede4d5, #ede4d5 4px, #f7f1e6 4px, #f7f1e6 8px); color: var(--muted); border: 1px dashed var(--line-2); }
.gantt-today { position: absolute; left: 47%; top: -9px; bottom: -9px; width: 1px; background: var(--wine); opacity: 0.45; }
.gantt-today::after { content: "今日"; display: none; position: absolute; top: -15px; left: 50%; transform: translateX(-50%); font-size: 7px; color: var(--wine); white-space: nowrap; }
.gantt-row:nth-of-type(2) .gantt-today::after { display: block; }
.accept-list .list-item { align-items: flex-start; }
.accept-list .check { margin-top: 2px; }
.overdue-card { border-left: 3px solid var(--wine); }
.overdue-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f5eee3; }
.overdue-item:last-child { border-bottom: 0; padding-bottom: 0; }
.overdue-item .d { flex: 0 0 42px; font-family: var(--serif); font-size: 10px; color: var(--wine); text-align: center; }
.overdue-item .grow { font-size: 10px; color: var(--ink-3); line-height: 1.6; }
.overdue-item .grow span { display: block; font-size: 8.5px; color: var(--faint); }

/* ————— 提醒 ————— */
.reminder-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 18px; align-items: start; }
.reminder-day-events { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.r-event { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f6f0e5; }
.r-event:last-child { border-bottom: 0; }
.r-event .t { font-size: 10.5px; color: var(--ink-2); line-height: 1.6; }
.r-event .m { margin-top: 2px; font-size: 8.5px; color: var(--muted); }
.r-event .tag { flex: 0 0 auto; }
.rule-table td { font-size: 10.5px; }
.rule-table .switch { margin-left: auto; }
.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.channel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
}
.channel .ico { width: 17px; height: 17px; color: var(--gold); flex: 0 0 17px; }
.channel .grow b { display: block; font-size: 10px; font-weight: 500; color: var(--ink-2); }
.channel .grow span { display: block; font-size: 8px; color: var(--faint); margin-top: 1px; }

/* ————— 归档 ————— */
.archive-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.archive-side .card + .card { margin-top: 14px; }
.archive-filter { display: flex; flex-direction: column; gap: 2px; }
.archive-filter button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 10px;
  color: var(--ink-3);
  text-align: left;
}
.archive-filter button:hover { background: var(--card-2); }
.archive-filter button.is-active { background: var(--gold-wash); color: var(--gold-deep); }
.archive-filter button .count { margin-left: auto; font-size: 8.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.archive-filter .group-label { padding: 12px 9px 4px; font-size: 8.5px; letter-spacing: 0.16em; color: var(--faint); }
.archive-stat { display: flex; align-items: center; gap: 14px; }
.archive-stat .ring { width: 74px; height: 74px; flex-basis: 74px; }
.archive-stat .ring-center b { font-size: 20px; }
.archive-stat .txt b { display: block; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.archive-stat .txt span { display: block; margin-top: 2px; font-size: 9px; color: var(--muted); }
.borrow-item { display: flex; gap: 9px; padding: 8px 0; border-bottom: 1px solid #f6f0e5; }
.borrow-item:last-child { border-bottom: 0; }
.borrow-item .avatar { width: 24px; height: 24px; flex-basis: 24px; font-size: 9px; }
.borrow-item .t { font-size: 9.5px; color: var(--ink-3); line-height: 1.55; }
.borrow-item .m { font-size: 8px; color: var(--faint); margin-top: 1px; }
.archive-stamp {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--line-2);
  border-radius: 9px;
  text-align: center;
}
.archive-stamp .st {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(131, 61, 61, 0.35);
  border-radius: 50%;
  color: rgba(131, 61, 61, 0.55);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.4;
  transform: rotate(-8deg);
  letter-spacing: 0.06em;
}
.archive-stamp .cap { margin-top: 8px; font-size: 8px; letter-spacing: 0.12em; color: var(--faint); }

/* ————— 报表 ————— */
.report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.report-kpi { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.report-kpi > span { font-size: 9px; letter-spacing: 0.1em; color: var(--muted); }
.report-kpi b span { font-size: inherit; color: inherit; letter-spacing: 0; }
.report-kpi b { display: block; margin-top: 5px; font-family: var(--serif); font-size: 23px; font-weight: 600; color: var(--ink); }
.report-kpi b em { font-style: normal; font-size: 9px; color: var(--muted); font-family: var(--sans); margin-left: 3px; }
.report-kpi small { display: block; margin-top: 3px; font-size: 8.5px; color: var(--faint); }
.report-kpi small .up { color: var(--sage); }
.report-kpi small .down { color: var(--wine); }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.report-grid + .report-grid { margin-top: 18px; }
.funnel { display: flex; flex-direction: column; gap: 7px; }
.funnel-row { display: flex; align-items: center; gap: 10px; }
.funnel-row .lb { flex: 0 0 52px; font-size: 9px; color: var(--muted); }
.funnel-bar { height: 26px; display: flex; align-items: center; padding: 0 9px; border-radius: 5px; background: var(--gold-wash); color: var(--gold-deep); font-size: 9px; font-variant-numeric: tabular-nums; min-width: 40px; transition: width 0.8s; }
.funnel-row:nth-child(1) .funnel-bar { background: #2c4136; color: #f3e8d5; }
.funnel-row:nth-child(2) .funnel-bar { background: #516b58; color: #f3e8d5; }
.funnel-row:nth-child(3) .funnel-bar { background: #8a7350; color: #fffaf0; }
.funnel-row:nth-child(4) .funnel-bar { background: #c3a475; color: #2a2115; }
.funnel-row:nth-child(5) .funnel-bar { background: #e7d6b8; color: #6f5531; }
.funnel-row .pct { font-size: 8.5px; color: var(--faint); margin-left: auto; }
.rank-list { display: flex; flex-direction: column; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f6f0e5; }
.rank-item:last-child { border-bottom: 0; }
.rank-no { width: 18px; font-family: var(--serif); font-size: 11px; color: var(--gold); text-align: center; }
.rank-item:nth-child(-n+3) .rank-no { color: var(--wine); }
.rank-name { flex: 1; min-width: 0; font-size: 10px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-amount { font-family: var(--serif); font-size: 10.5px; color: var(--ink-2); }
.rank-bar { width: 62px; height: 4px; border-radius: 4px; background: #f0e8db; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--gold-2); }
.stack-chart { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding-top: 10px; }
.stack-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; min-width: 0; }
.stack-col i { display: block; border-radius: 2px; }
.stack-col .s1 { background: var(--pine-3); }
.stack-col .s2 { background: var(--gold-2); }
.stack-col .s3 { background: var(--clay); }
.stack-labels { display: flex; gap: 12px; margin-top: 6px; }
.stack-labels span { flex: 1; text-align: center; font-size: 8px; color: var(--faint); }

/* ————— 权限 ————— */
.permission-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.perm-role { padding: 15px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f5eee3; }
.member-row:last-child { border-bottom: 0; }
.member-row .nm { font-size: 10.5px; color: var(--ink-2); }
.member-row .dp { font-size: 8.5px; color: var(--faint); }
.member-row .grow { min-width: 0; }
.member-row .select { width: 104px; height: 30px; font-size: 9.5px; }
.org-summary { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.org-summary .seal { width: 36px; height: 36px; flex-basis: 36px; border-color: var(--gold-3); background: var(--gold-wash); color: var(--gold-deep); }
.org-summary .seal span { font-size: 18px; }
.org-summary .seal::before { display: none; }
.org-summary b { display: block; font-family: var(--serif); font-size: 12px; }
.org-summary span { display: block; font-size: 8.5px; color: var(--faint); }
.data-scope { display: flex; flex-direction: column; gap: 8px; }
.scope-option { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: all 0.15s; }
.scope-option:hover { border-color: var(--gold-3); background: #fdf9f1; }
.scope-option:has(input:checked) { border-color: var(--gold-2); background: var(--gold-wash); }
.scope-option input { margin-top: 3px; }
.scope-option b { display: block; font-size: 10.5px; font-weight: 500; color: var(--ink-2); }
.scope-option span { display: block; margin-top: 1px; font-size: 8.5px; color: var(--muted); }
.matrix-group td { background: #faf5ea; font-size: 9px; letter-spacing: 0.08em; color: var(--muted); padding-top: 7px; padding-bottom: 7px; }
.perm-note { display: flex; align-items: center; gap: 8px; font-size: 9.5px; color: var(--faint); }

/* ————— 设置 ————— */
.settings-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-main { min-width: 0; }
.settings-nav { padding: 8px; }
.settings-nav a { display: block; padding: 8px 10px; border-radius: 7px; font-size: 10.5px; color: var(--muted); }
.settings-nav a:hover { background: var(--card-2); color: var(--ink-2); }
.settings-nav a.is-active { background: var(--gold-wash); color: var(--gold-deep); }
.logo-upload { display: flex; align-items: center; gap: 16px; }
.logo-preview {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-3);
  background: var(--gold-wash);
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 26px;
  border-radius: 8px;
}
.number-preview {
  padding: 16px;
  border: 1px dashed var(--gold-3);
  border-radius: 9px;
  background: #fdf8ee;
  text-align: center;
}
.number-preview span { font-size: 8.5px; letter-spacing: 0.16em; color: var(--faint); }
.number-preview b { display: block; margin-top: 6px; font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink); }
.number-preview small { display: block; margin-top: 4px; font-size: 8.5px; color: var(--muted); }
.mini-flow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.mini-flow .n {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  font-size: 9.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.mini-flow .n b { font-weight: 500; color: var(--ink-2); }
.mini-flow .n + .n { margin-left: 20px; position: relative; }
.mini-flow .n + .n::before { content: "→"; position: absolute; left: -16px; color: var(--gold-2); font-size: 10px; }
.log-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f5eee3; font-size: 9.5px; color: var(--muted); }
.log-row:last-child { border-bottom: 0; }
.log-row .time { flex: 0 0 82px; color: var(--faint); font-variant-numeric: tabular-nums; }
.log-row .who { flex: 0 0 54px; color: var(--ink-3); }
.log-row .what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row .res { color: var(--sage); }

/* ————— 模板库 ————— */
.tpl-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.tpl-toolbar .grow { min-width: 200px; }
.tpl-toolbar .segmented { margin-left: auto; }
.tpl-card-lg { min-height: 100%; }
.tpl-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--pine);
  color: #f1e6d2;
  font-size: 8px;
  letter-spacing: 0.08em;
  z-index: 2;
}
.tpl-cat { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; background: var(--gold-wash); color: var(--gold-deep); font-size: 8.5px; }
.tpl-desc { margin-top: 7px; font-size: 9px; color: var(--muted); line-height: 1.7; }
.tpl-info { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 8.5px; color: var(--faint); }
.tpl-info span { display: inline-flex; align-items: center; gap: 4px; }
.tpl-info .ico { width: 11px; height: 11px; }

/* ————— 响应式补充 ————— */
@media (max-width: 1180px) {
  .detail-head { padding: 22px 24px 0; }
  .draft-layout { grid-template-columns: minmax(0, 1fr); }
  .draft-summary { position: static; }
  .contract-doc { grid-template-columns: minmax(0, 1fr); }
  .report-grid { grid-template-columns: minmax(0, 1fr); }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reminder-layout { grid-template-columns: minmax(0, 1fr); }
  .permission-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .archive-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { display: none; }
  .sign-hero { grid-template-columns: 1fr; }
  .sign-hero-side { border-left: 0; border-top: 1px solid rgba(198, 168, 118, 0.22); flex-direction: row; justify-content: flex-start; }
}

@media (max-width: 860px) {
  .detail-top { flex-direction: column; }
  .detail-amount { text-align: left; }
  .detail-actions { justify-content: flex-start; margin-top: 14px; }
  .detail-title { font-size: 21px; }
  .template-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-1 { grid-column: span 1; }
  .wizard-card { padding: 20px 18px; }
  .review-grid { grid-template-columns: minmax(0, 1fr); }
  .clause-grid { grid-template-columns: minmax(0, 1fr); }
  .archive-layout { grid-template-columns: minmax(0, 1fr); }
  .archive-side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .archive-side .card + .card { margin-top: 0; }
  .permission-layout { grid-template-columns: minmax(0, 1fr); }
  .role-list { display: grid; grid-template-columns: 1fr 1fr; }
  .channel-grid { grid-template-columns: minmax(0, 1fr); }
  .node-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .node:nth-child(3) { border-left: 0; padding-left: 0; }
  .flow-preview { flex-direction: column; gap: 22px; }
  .flow-preview-node + .flow-preview-node { margin-left: 0; }
  .flow-preview-node + .flow-preview-node::before { content: "↓"; left: 50%; top: -19px; transform: translateX(-50%); }
  .gantt-head { grid-template-columns: 130px repeat(6, minmax(0, 1fr)); }
  .gantt-row { grid-template-columns: 130px minmax(0, 1fr); }
  .detail-tabs .tab { padding: 0 10px; }
  .detail-tabs .tab .count { display: none; }
  .sign-hero-main { padding: 20px; }
  .ap-stat { min-width: 50%; padding: 10px 16px; }
  .ap-stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .report-kpis { gap: 10px; }
}

@media (max-width: 560px) {
  .template-pick { grid-template-columns: minmax(0, 1fr); }
  .archive-side { grid-template-columns: minmax(0, 1fr); }
  .role-list { grid-template-columns: minmax(0, 1fr); }
  .sign-hero-side { flex-wrap: wrap; }
  .detail-head { padding: 18px 16px 0; }
  .detail-actions .btn { flex: 1; }
  .detail-actions { flex-wrap: wrap; }
  .review-grid .paper { padding: 20px 16px; }
  .node-strip { grid-template-columns: minmax(0, 1fr); }
  .node { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 10px; }
  .node:first-child { border-top: 0; padding-top: 0; }
  .table-progress { min-width: 70px; }
  .ap-stat b { font-size: 19px; }
  .report-kpi b { font-size: 20px; }
  .paper .sign-area { flex-direction: column; gap: 12px; }
}


/* 工作台底部三栏 */
.dash-bottom { grid-template-columns: 1.2fr 0.9fr 0.9fr; }
@media (max-width: 1180px) {
  .dash-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-bottom > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .dash-bottom { grid-template-columns: minmax(0, 1fr); }
  .dash-bottom > :last-child { grid-column: auto; }
}

/* 底部卡片底部对齐 */
.dash-bottom > .card { display: flex; flex-direction: column; }
.dash-bottom > .card > .card-body { flex: 1; }
