:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e6eaf0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06);
  --shadow-lg: 0 20px 25px -5px rgba(16,24,40,0.10), 0 8px 10px -6px rgba(16,24,40,0.05);
  --shadow-xl: 0 25px 50px -12px rgba(16,24,40,0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 236px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: 'Inter', 'Noto Sans SC', sans-serif; background: var(--bg); color: var(--text); }

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 600px at 20% -10%, #dbeafe 0%, transparent 50%), radial-gradient(1000px 500px at 100% 110%, #e0e7ff 0%, transparent 50%), linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  padding: 20px;
}
.login-card {
  background: var(--card);
  padding: 48px 44px;
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.6);
}
.login-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  color: #fff;
  font-size: 30px;
  box-shadow: 0 8px 20px -6px rgba(37,99,235,0.5);
}
.login-title { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.login-subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 28px; }
.form-group { text-align: left; margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text-secondary); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: border .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 8px -2px rgba(16,24,40,0.12); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; border: none; box-shadow: 0 2px 6px -1px rgba(37,99,235,0.4); }
.btn-primary:hover { background: linear-gradient(135deg, #1d4ed8, #2563eb); box-shadow: 0 6px 12px -2px rgba(37,99,235,0.5); }
.btn-block { width: 100%; padding: 13px; font-size: 15px; font-weight: 600; }
.login-hint { margin-top: 16px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* Layout */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1e293b 0%, #26344b 55%, #334155 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 10;
}
.sidebar-header {
  padding: 20px 18px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -4px rgba(59,130,246,0.6);
}
.sidebar-title { font-size: 15px; font-weight: 700; line-height: 1.25; color: #f8fafc; }
.sidebar-sub { font-size: 11px; color: #94a3b8; margin-top: 1px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 12px 24px; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.24); }
.nav-section { margin-top: 14px; }
.nav-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #a5b4c8;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  border-radius: 7px;
  transition: color .15s;
}
.nav-section-title:hover { color: #cbd5e1; }
.nav-caret { font-size: 12px; width: 12px; text-align: center; transition: color .15s; }
.nav-section-body { display: none; margin-top: 3px; }
.nav-section.open .nav-section-body { display: block; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  transition: all .16s cubic-bezier(.4,0,.2,1);
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 14px -4px rgba(37,99,235,0.55);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 3px;
  background: #fff;
}
.nav-item.nav-sub {
  padding: 6px 12px 6px 38px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 400;
}
.nav-item.nav-sub:hover { color: #e2e8f0; background: rgba(255,255,255,0.05); }
.nav-item.nav-sub.active {
  background: transparent;
  box-shadow: none;
  color: #60a5fa;
  font-weight: 600;
}
.nav-item.nav-sub.active::before { background: #60a5fa; height: 14px; }
.nav-item.nav-sub .nav-icon { font-size: 10px; width: 14px; }
.nav-icon {
  width: 26px; height: 26px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  background: rgba(148,163,184,0.14);
  font-size: 14px;
  color: #cbd5e1;
  transition: all .16s;
}
.nav-item:hover .nav-icon { color: #fff; background: rgba(148,163,184,0.22); }
.nav-item.active .nav-icon { background: rgba(255,255,255,0.22); color: #fff; }
.nav-item.nav-sub .nav-icon { background: transparent; width: 14px; height: auto; font-size: 10px; }
.nav-item.nav-sub.active .nav-icon { color: #60a5fa; background: transparent; }
.main { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar {
  height: 60px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-btn {
  padding: 7px 13px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: all .15s;
  box-shadow: var(--shadow);
  color: var(--text);
}
.topbar-btn:hover { background: var(--bg); transform: translateY(-1px); }
.content { padding: 24px; }
.page-header { margin-bottom: 20px; }
.page-header h1 { font-size: 22px; margin: 0 0 4px; font-weight: 700; }
.page-header p { margin: 0; color: var(--text-secondary); font-size: 13px; }

/* Cards & Tables */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  width: 260px;
}
.search-box input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: border .15s, box-shadow .15s;
}
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.search-box::before {
  content: "⌕";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}
.date-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.date-range input {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: #fff;
}
.date-range input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td { padding: 9px 4px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #fafbfc; font-weight: 600; color: var(--text-secondary); font-size: 12px; letter-spacing: .2px; }
.table-wrap.compact th, .table-wrap.compact td { padding: 4px 10px; line-height: 1.25; }
.table-wrap.compact td { font-size: 12px; }
.table-wrap.compact th { padding: 6px 10px; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f8fafc; }
tbody tr:last-child td { border-bottom: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--border); }
.pg-btn { padding: 6px 14px; font-size: 13px; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.pg-info { font-size: 13px; color: var(--text-secondary); }
.link { color: var(--primary); cursor: pointer; text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-warn { background: #fff7ed; color: #c2410c; }
.badge-success { background: #ecfdf5; color: #047857; }
.badge-danger { background: #fef2f2; color: #b91c1c; }
.badge-info { background: #eff6ff; color: #1d4ed8; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.inc { color: #047857; }
.exp { color: #b91c1c; }
.flow-summary { margin: 4px 0 18px; }
.flow-summary-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; }
.flow-group { margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.flow-group-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 12px 16px; background: #fafbfc; border-bottom: 1px solid var(--border);
}
.flow-group-label { font-weight: 700; font-size: 14px; }
.flow-group-bal { font-size: 12.5px; color: var(--text-secondary); }
.flow-group-bal b { color: var(--text); font-weight: 600; }
.action-btns { display: flex; gap: 6px; align-items: center; }
/* 表格内按钮压缩：让供应链展示列表行高与报表中心一致（不受内联 style 覆盖） */
.table-wrap td .btn,
.table-wrap .action-btns .btn {
  padding: 2px 6px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  height: auto;
  vertical-align: middle;
}
.table-wrap td .icon-btn,
.table-wrap .action-btns .icon-btn {
  width: 22px !important;
  height: 22px !important;
  font-size: 11px !important;
}
.table-wrap td { vertical-align: middle; }
.icon-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: all .15s;
  box-shadow: var(--shadow);
}
.icon-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 920px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: slideUp .2s cubic-bezier(.4,0,.2,1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-secondary); width: 32px; height: 32px; border-radius: 8px; transition: all .15s; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.form-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.form-col { flex: 1; min-width: 180px; }
.form-col label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-col input, .form-col select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: border .15s, box-shadow .15s;
}
.form-col input:focus, .form-col select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Permission table */
.perm-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.perm-row { display: grid; grid-template-columns: 1fr 72px 72px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.perm-row:last-child { border-bottom: none; }
.perm-row.perm-head { background: #f8fafc; font-weight: 600; color: var(--text-secondary); font-size: 12px; }
.perm-row span:nth-child(2), .perm-row span:nth-child(3) { text-align: center; }
.perm-row input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }

/* Detail lines */
.lines-table th, .lines-table td { padding: 10px 4px; }
.lines-table input, .lines-table select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
}
.lines-table input:focus, .lines-table select:focus { outline: none; border-color: var(--primary); }
.inv-combo { position: relative; }
.inv-combo .inv-combo-search { min-width: 200px; max-width: 340px; }
.inv-combo .inv-combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 320px;
  max-width: 460px;
  max-height: 264px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px -10px rgba(15,23,42,.25);
  z-index: 40;
  display: none;
}
.inv-combo .inv-combo-item {
  padding: 8px 11px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
}
.inv-combo .inv-combo-item + .inv-combo-item { border-top: 1px solid #f1f5f9; }
.inv-combo .inv-combo-item:hover { background: var(--primary-light); }
.inv-combo .inv-combo-item mark { background: #ffe08a; color: inherit; padding: 0 1px; border-radius: 2px; }
.inv-combo .inv-combo-empty { padding: 14px; font-size: 12.5px; color: var(--text-secondary); text-align: center; }
.line-info { margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.line-info .li-name { font-weight: 600; color: var(--text); }
.line-info .li-meta { color: var(--text-secondary); }
.line-info .li-cfg { color: var(--primary); margin-top: 2px; }
.add-line { margin-top: 8px; }
.total-row { text-align: right; padding: 16px 4px; font-size: 15px; font-weight: 700; color: var(--primary); }

/* Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 20px;
  transition: all .18s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -4px rgba(16,24,40,0.1); }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.dashboard-section { margin-bottom: 24px; }
.dashboard-section h3 { font-size: 15px; margin: 0 0 12px; font-weight: 700; }

/* Currency display */
.currency-pill {
  display: inline-flex;
  gap: 8px;
  font-size: 12px;
}
.currency-pill .cny { color: var(--text); }
.currency-pill .usd { color: var(--text-secondary); }

/* Detail view */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.detail-item dt { font-size: 11px; color: var(--text-secondary); margin-bottom: 3px; }
.detail-item dd { margin: 0; font-size: 14px; font-weight: 500; }
.detail-lines { margin-top: 16px; }

/* Print/export */
@media print {
  .sidebar, .topbar, .toolbar, .modal-footer, .action-btns { display: none !important; }
  .main { margin-left: 0 !important; }
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { width: 64px; }
  .sidebar-title, .sidebar-sub, .nav-section-title, .nav-item span { display: none; }
  .nav-item { justify-content: center; padding: 12px 0; }
  .main { margin-left: 64px; }
}

/* 收款单客户搜索下拉 */
.rc-customer-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.10);
  z-index: 30;
  margin-top: 4px;
}
.rc-customer-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rc-customer-item:last-child { border-bottom: none; }
.rc-customer-item:hover { background: #f8fafc; }
.rc-customer-name { font-size: 13.5px; font-weight: 500; color: var(--text); }
.rc-customer-code { font-size: 11.5px; color: var(--text-secondary); }
.rc-customer-empty { padding: 12px 10px; color: var(--text-secondary); font-size: 12.5px; text-align: center; }

/* 通用可搜索下拉（客户/供应商/银行账号等基础档案选择） */
.sc-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.10);
  z-index: 30;
  margin-top: 4px;
}
.sc-item {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sc-item:last-child { border-bottom: none; }
.sc-item:hover { background: #f8fafc; }
.sc-name { font-size: 13.5px; font-weight: 500; color: var(--text); }
.sc-sub { font-size: 11.5px; color: var(--text-secondary); }
.sc-empty { padding: 12px 10px; color: var(--text-secondary); font-size: 12.5px; text-align: center; }

/* ===== 客户对帐单模板（CRM，按销售单生成）===== */
.statement-page {
  padding: 28px 36px;
  background: #fff;
  border-radius: var(--radius-sm);
}
.statement-page .stmt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 18px;
}
.statement-page .stmt-co { line-height: 1.4; }
.statement-page .stmt-co-cn { font-size: 18px; font-weight: 700; color: var(--text); }
.statement-page .stmt-co-en { font-size: 12px; color: var(--text-secondary); letter-spacing: .5px; }
.statement-page .stmt-title-block { text-align: right; }
.statement-page .stmt-title-block h1 { margin: 0; font-size: 24px; color: var(--primary); letter-spacing: 2px; }
.statement-page .stmt-subtitle { font-size: 12px; color: var(--text-secondary); letter-spacing: 1px; }
.statement-page .stmt-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
  font-size: 13px;
}
.statement-page .stmt-meta-col { display: grid; grid-template-columns: 90px 1fr; row-gap: 6px; column-gap: 8px; align-items: baseline; }
.statement-page .stmt-meta-col > div { display: contents; }
.statement-page .meta-label { color: var(--text-secondary); font-size: 12px; text-align: right; }
.statement-page .statement-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}
.statement-page .statement-table th,
.statement-page .statement-table td {
  padding: 8px 6px;
  font-size: 12.5px;
  border-bottom: 1px solid #e5e7eb;
}
.statement-page .statement-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
}
.statement-page .statement-table td.num,
.statement-page .statement-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.statement-page .row-receipt td { color: var(--text-secondary); }
.statement-page .row-sale td:first-child,
.statement-page .row-receipt td:first-child { font-weight: 500; }
.statement-page .stmt-tfoot-sum td { border-top: 2px solid #cbd5e1; border-bottom: none; }
/* 销售单展开产品行（同销售单的第 2/3/... 行）：淡色 + 左侧边框线表示归属 */
.statement-page .statement-table tr.stmt-line td { background: #f8fafc; color: var(--text-secondary); }
.statement-page .statement-table tr.stmt-line td:first-child,
.statement-page .statement-table tr.stmt-line td:nth-child(2) { border-left: 2px solid var(--primary); }
.statement-page .stmt-sign {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-top: 36px;
  padding-top: 18px;
}
.statement-page .stmt-sign-cell { display: flex; flex-direction: column; gap: 8px; }
.statement-page .stmt-sign-label { font-size: 12px; color: var(--text-secondary); }
.statement-page .stmt-sign-line {
  border-bottom: 1px solid #cbd5e1;
  height: 32px;
  font-size: 12px;
  color: var(--text-secondary);
  padding-bottom: 4px;
}

@media print {
  .statement-page { box-shadow: none; border-radius: 0; padding: 16px; }
  .statement-page .stmt-title-block h1 { font-size: 22px; }
}
