/* 恒泰飞鸿 ERP 网页版 - 全局样式 */
/* 字体由国内静态 CDN 引入；此处只做渲染质量控制，不引入 Google Fonts。 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #1d4ed8;
  --brand-dark: #1e40af;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
}
html {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, sans-serif; font-weight: 400; background: var(--bg); color: var(--text); font-size: 14px; }
button, input, select, textarea { font-family: inherit; font-weight: 400; }
h1, h2, h3, h4, h5, h6, .card-title h3, .brand-txt strong { font-weight: 500 !important; }
a { text-decoration: none; color: inherit; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #0f172a; color: #cbd5e1; flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 14px; border-bottom: 1px solid #1e293b; }
.brand-badge { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), #60a5fa); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.brand-txt { line-height: 1.2; }
.brand-txt strong { display: block; color: #fff; font-size: 15px; }
.brand-txt small { font-size: 11px; color: #64748b; }

.menu { padding: 8px 10px; flex: 1; }
.menu-group { font-size: 11px; color: #475569; margin: 14px 8px 6px; letter-spacing: 1px; }
.menu-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 7px; margin: 2px 0; color: #cbd5e1; font-size: 14px; }
.menu-item span { width: 18px; text-align: center; }
.menu-item:hover { background: #1e293b; color: #fff; }
.menu-item.on { background: var(--brand); color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: var(--card); border-bottom: 1px solid var(--border); padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 10; }
.topbar-title { font-size: 17px; font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.u-profile { display:flex; align-items:center; gap:8px; color:inherit; text-decoration:none; }
.u-profile:hover .u-name { color:var(--brand); }
.u-avatar { width:32px; height:32px; border-radius:50%; object-fit:cover; border:1px solid #dbe3ee; background:#f1f5f9; flex:0 0 auto; }
.u-avatar-placeholder { display:inline-flex; align-items:center; justify-content:center; background:#dbeafe; color:#1d4ed8; font-size:13px; font-weight:600; }
.u-name { font-weight: 600; }
.u-role { background: #eff6ff; color: var(--brand); padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.btn-link { color: var(--brand); }

.content { padding: 20px 24px; flex: 1; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 14px; }

.alert { padding: 11px 16px; border-radius: 7px; margin-bottom: 14px; font-size: 14px; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--ok); }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: var(--err); }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: var(--warn); }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.card h3 { font-size: 15px; margin-bottom: 12px; color: #1e293b; }
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-title h3 { margin: 0; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 7px; border: 1px solid transparent; cursor: pointer; font-size: 14px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--err); }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-warn { background: var(--warn); color: #fff; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; white-space: nowrap; }
table.data thead th { background: #f8fafc; font-weight: 600; color: #334155; }
table.data tbody tr:nth-child(even) { background: #fbfdff; }
table.data tbody tr:hover { background: #eff6ff; }
table.data .num { text-align: right; }
table.data .c { text-align: center; }
td.actions a, td.actions button { margin-right: 6px; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 14px; }
.form-item { display: flex; flex-direction: column; gap: 5px; }
.form-item label { font-size: 13px; color: var(--muted); }
.form-item input, .form-item select, .form-item textarea { padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; font-family: inherit; }
.form-item input:focus, .form-item select:focus { outline: 2px solid #bfdbfe; border-color: var(--brand); }
input:focus, select:focus, textarea:focus { background-color: #fff7cc !important; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.form-row .form-item { flex: 1; min-width: 150px; }
.form-actions { margin-top: 16px; display: flex; gap: 10px; }

/* 标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag-ok { background: #dcfce7; color: var(--ok); }
.tag-warn { background: #fef3c7; color: var(--warn); }
.tag-err { background: #fee2e2; color: var(--err); }
.tag-info { background: #dbeafe; color: var(--brand); }
.tag-muted { background: #f1f5f9; color: var(--muted); }

/* 统计条 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 6px; }
.stat .v.ok { color: var(--ok); }
.stat .v.warn { color: var(--warn); }
.stat .v.brand { color: var(--brand); }

/* 明细编辑表格（多行） */
table.editable th, table.editable td { white-space: nowrap; }
table.editable input, table.editable select { width: 100%; min-width: 70px; padding: 5px 6px; border: 1px solid var(--border); border-radius: 5px; font-size: 13px; }

/* 工具条 */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; }

.modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal.show { display: flex; }
.modal-box { background: #fff; border-radius: 10px; width: 640px; max-width: 95vw; max-height: 88vh; overflow: auto; padding: 18px; }
.modal-box h3 { margin-bottom: 14px; }
.modal-close { float: right; cursor: pointer; color: var(--muted); font-size: 18px; }

/* 单据详情弹窗（点击单据编号弹出小窗口） */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal-panel { background: #fff; border-radius: 12px; width: 820px; max-width: 96vw; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.detail-modal { max-height: 88vh; width: 940px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: var(--brand); }
.modal-body { padding: 16px; overflow: auto; min-height: 0; flex: 1 1 auto; }
.modal-body .loading { text-align: center; color: var(--muted); padding: 30px; }
.modal-body .view-head { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; background: #f8fafc; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-size: 13px; }
.modal-body .view-head .v-i { display: flex; }
.modal-body .view-head .v-k { color: var(--muted); margin-right: 6px; flex: 0 0 auto; }
.modal-body .view-head .v-k::after { content: "："; }
.modal-body table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.modal-body .view-foot { margin-top: 12px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.modal-body .view-foot a { color: var(--brand); }
.modal-body .view-actions { margin-top: 12px; display: flex; gap: 8px; }

/* 凭证文件 */
.view-voucher { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; background: #f8fafc; font-size: 13px; }
.voucher-tag { display: inline-block; background: #eff6ff; color: var(--brand); border: 1px solid #bfdbfe; border-radius: 6px; padding: 2px 8px; font-size: 12px; margin-right: 8px; }
.voucher-link { color: var(--brand); text-decoration: none; }
.voucher-link:hover { text-decoration: underline; }


.empty { text-align: center; color: var(--muted); padding: 30px; }
.pager { margin-top: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pager a, .pager span, .pager b { padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .cur, .pager b { background: var(--brand); color: #fff; border-color: var(--brand); }
.readonly { padding: 8px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; min-height: 36px; line-height: 1.5; color: #334155; }
.pager-wrap { margin-top: 4px; }

/* 图片/PDF 预览弹窗 */
.image-modal { width: auto; max-width: 92vw; max-height: 92vh; }
.image-modal .modal-body { display: flex; align-items: center; justify-content: center; padding: 10px; }
.image-modal .modal-body img { max-width: 86vw; max-height: 78vh; width: auto; height: auto; border-radius: 4px; display: block; }
.image-modal .modal-body iframe { width: 84vw; height: 76vh; border: 0; background: #fff; }

/* 搜索选择下拉 */
.ac-menu { position:fixed; display:none; z-index:9999; min-width:220px; max-height:260px; overflow-y:auto; background:#fff; border:1px solid #cbd5e1; border-radius:6px; box-shadow:0 10px 28px rgba(15,23,42,.18); font-size:13px; }
.ac-menu .ac-item { padding:7px 10px; cursor:pointer; border-bottom:1px solid #f1f5f9; }
.ac-menu .ac-item:last-child { border-bottom:0; }
.ac-menu .ac-item:hover, .ac-menu .ac-item.active { background:#eff6ff; }
.ac-menu .ac-code { color:#64748b; font-size:11px; margin-left:8px; }
.ac-menu .ac-empty { padding:8px 10px; color:#94a3b8; }

/* 客户库存选择 */
.stock-pick { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:260px; max-width:360px; padding:8px 10px; border:1px solid #dbeafe; border-radius:7px; background:#fff; }
.stock-pick-info { min-width:0; }
.stock-pick-name { font-size:13px; font-weight:600; color:#1e293b; word-break:break-all; }
.stock-pick-meta { margin-top:3px; font-size:11px; color:#64748b; }

/* 出库明细物料名称列加宽 */
.data .name-col { min-width:220px; }
.data .mat-name { min-width:210px; width:100%; }

/* 表单保存错误定位 */
.form-error { margin: 0 0 12px; padding: 9px 12px; border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; border-radius: 7px; font-size: 13px; }
.error-row td { background: #fff7cc !important; }
.ck-table th, .ck-table td { text-align: left !important; }

/* 应收应付：收款/付款区域区分 */
.zone-receipt { border-top: 4px solid #10b981; background: #f0fdf4; }
.zone-payment { border-top: 4px solid #f97316; background: #fff7ed; }
.zone-receipt .card-title h3 { color: #047857; }
.zone-payment .card-title h3 { color: #c2410c; }
.zone-receipt .merge-box { background: #ecfdf5 !important; border-color: #a7f3d0 !important; }
.zone-payment .merge-box { background: #fff7ed !important; border-color: #fed7aa !important; }
.zone-receipt .stat { background: #f0fdf4; border-color: #bbf7d0; }
.zone-payment .stat { background: #fff7ed; border-color: #fed7aa; }
.zone-receipt .stat .v { color: #047857; }
.zone-payment .stat .v { color: #c2410c; }
.zone-receipt .table-wrap { border-top: 2px solid #d1fae5; }
.zone-payment .table-wrap { border-top: 2px solid #ffedd5; }

/* 采购单详情弹窗 */
.cg-detail { overflow: hidden; }
.cg-paid { border-top: 4px solid #10b981; }
.cg-unpaid { border-top: 4px solid #f97316; }
.cg-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 16px; border-bottom: 1px solid #e2e8f0; }
.cg-supplier { font-size: 28px; font-weight: 800; line-height: 1.25; letter-spacing: .5px; word-break: break-all; }
.cg-meta { margin-top: 6px; font-size: 12px; color: #64748b; }
.cg-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; }
.cg-paid .cg-hero { background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%); border-bottom-color: #bbf7d0; }
.cg-paid .cg-supplier { color: #047857; }
.cg-unpaid .cg-hero { background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%); border-bottom-color: #fed7aa; }
.cg-unpaid .cg-supplier { color: #c2410c; }
.cg-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 20px; }
.cg-metric { padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; display: flex; flex-direction: column; gap: 5px; }
.cg-metric span { font-size: 12px; color: #64748b; }
.cg-metric strong { font-size: 20px; line-height: 1.2; }
.cg-amount strong { color: #b91c1c; font-size: 24px; }
.cg-paid .cg-status { background: #dcfce7; border-color: #86efac; }
.cg-paid .cg-status strong { color: #047857; }
.cg-unpaid .cg-status { background: #ffedd5; border-color: #fdba74; }
.cg-unpaid .cg-status strong { color: #c2410c; }
.cg-tax { background: #eff6ff; border-color: #bfdbfe; }
.cg-tax strong { color: #1d4ed8; }
.cg-info { margin: 0 20px 4px; }
.cg-section-title { margin: 18px 20px 8px; font-size: 14px; font-weight: 700; color: #334155; border-left: 4px solid #94a3b8; padding-left: 8px; }
.cg-paid .cg-section-title { border-left-color: #10b981; }
.cg-unpaid .cg-section-title { border-left-color: #f97316; }
.cg-detail .table-wrap { margin: 0 20px; }
.cg-pay-actions { display: flex; gap: 12px; margin: 16px 20px; flex-wrap: wrap; }
.cg-detail .view-voucher { margin: 0 20px 20px; }
.cg-voucher-extra { margin: 0 20px 20px; }
.rk-done { border-top: 4px solid #0ea5e9; }
.rk-done .cg-hero { background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%); border-bottom-color: #bae6fd; }
.rk-done .cg-supplier { color: #0369a1; }
.rk-done .cg-status { background: #e0f2fe; border-color: #7dd3fc; }
.rk-done .cg-status strong { color: #0369a1; }
.rk-done .cg-section-title { border-left-color: #0ea5e9; }
.rk-pending { border-top: 4px solid #f59e0b; }
.rk-pending .cg-hero { background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%); border-bottom-color: #fde68a; }
.rk-pending .cg-supplier { color: #b45309; }
.rk-pending .cg-status { background: #fef3c7; border-color: #fcd34d; }
.rk-pending .cg-status strong { color: #b45309; }
.rk-pending .cg-section-title { border-left-color: #f59e0b; }
@media (max-width: 700px) {
  .cg-metrics { grid-template-columns: 1fr; }
  .cg-hero { flex-direction: column; }
  .cg-actions { justify-content: flex-start; }
}


/* 应收应付生成单据弹窗 */
.merge-launch-box { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 14px; margin-bottom:14px; border:1px solid #dbeafe; border-radius:9px; background:#f8fbff; }
.merge-launch-box b { display:block; font-size:14px; color:#1e3a8a; margin-bottom:3px; }
.merge-launch-box span { font-size:12px; color:#64748b; }
.merge-picker-box { width:1100px; max-width:96vw; max-height:88vh; overflow:auto; }

/* 应收应付选择单据弹窗 */
.merge-picker-box { width:1180px; max-width:96vw; max-height:90vh; padding:0; display:flex; flex-direction:column; overflow:hidden; border-radius:12px; }
.merge-picker-head { padding:16px 20px; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; color:#fff; }
.merge-picker-head.head-receipt { background:linear-gradient(135deg,#059669 0%,#10b981 100%); }
.merge-picker-head.head-payment { background:linear-gradient(135deg,#ea580c 0%,#f97316 100%); }
.merge-picker-title { font-size:20px; font-weight:800; letter-spacing:.5px; }
.merge-picker-sub { margin-top:4px; font-size:12px; opacity:.88; }
.merge-picker-head .modal-close { color:#fff; opacity:.9; }
.merge-picker-head .modal-close:hover { color:#fff; opacity:1; }
.merge-picker-body { flex:1; min-height:0; overflow:auto; padding:14px 18px 16px; }
.merge-filter-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; margin-bottom:12px; border:1px solid #e2e8f0; border-radius:8px; background:#f8fafc; }
.merge-filter-bar input { padding:7px 9px; border:1px solid #cbd5e1; border-radius:6px; font-size:13px; }
.merge-filter-bar input[name=party] { width:240px; }
.merge-create-settings { padding:10px 12px; margin-bottom:12px; border:1px solid #e2e8f0; border-radius:8px; background:#f8fafc; }
.merge-picker-table { max-height:48vh; overflow:auto; border:1px solid #e2e8f0; border-radius:8px; }
.merge-picker-table thead th { position:sticky; top:0; background:#f1f5f9; z-index:2; }
.merge-picker-table tbody tr:hover td { background:#f8fafc; }
.merge-picker-footer { position:sticky; bottom:0; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 0 2px; margin-top:10px; border-top:1px solid #e2e8f0; background:#fff; }
.merge-picker-footer span { color:#64748b; font-size:13px; }
.merge-picker-footer b { color:#0f172a; }

/* 收付款单详情重点标识 */
.hb-detail-hero { padding:18px 20px 14px; border-bottom:1px solid #e2e8f0; }
.hb-party-name { font-size:30px; font-weight:800; line-height:1.25; letter-spacing:.5px; word-break:break-all; }
.hb-party-meta { margin-top:6px; font-size:12px; color:#64748b; }
.zone-receipt .hb-detail-hero { background:linear-gradient(135deg,#ecfdf5 0%,#f0fdf4 100%); border-bottom-color:#bbf7d0; }
.zone-receipt .hb-party-name { color:#047857; }
.zone-payment .hb-detail-hero { background:linear-gradient(135deg,#fff7ed 0%,#fffbeb 100%); border-bottom-color:#fed7aa; }
.zone-payment .hb-party-name { color:#c2410c; }
.hb-detail-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:16px 20px; }
.hb-metric { padding:12px 14px; border:1px solid #e2e8f0; border-radius:9px; background:#f8fafc; display:flex; flex-direction:column; gap:5px; }
.hb-metric span { font-size:12px; color:#64748b; }
.hb-metric strong { font-size:22px; line-height:1.2; color:#0f172a; }
.hb-metric-paid { border-color:#bbf7d0; background:#f0fdf4; }
.hb-metric-paid strong { color:#047857; }
.hb-metric-remaining { border-color:#fecaca; background:#fef2f2; }
.hb-metric-remaining strong { color:#b91c1c; }
.hb-metric-status { border-color:#bfdbfe; background:#eff6ff; }
.hb-metric-status strong { color:#1d4ed8; font-size:20px; }
.add-linked-doc { margin:12px 0 0; padding:10px 12px; border:1px dashed #cbd5e1; border-radius:8px; background:#f8fafc; }
.add-linked-doc form { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.add-linked-doc select { min-width:320px; padding:7px 9px; border:1px solid #cbd5e1; border-radius:6px; font-size:13px; }
.add-linked-empty { margin:10px 0 0; color:#94a3b8; font-size:12px; }
@media (max-width:760px){ .hb-detail-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.hb-party-company { margin-top:5px; font-size:16px; font-weight:600; color:#475569; }
.hb-white-table, .hb-white-table tbody td { background:#fff !important; }
.hb-white-table thead th { background:#f8fafc !important; }
table.data td a:not(.btn) { color:#2563eb; }
table.data td a:not(.btn):hover { color:#1d4ed8; text-decoration:underline; }

/* 通用操作确认弹窗 */
.action-confirm-panel { width:520px; max-width:94vw; max-height:88vh; }
.action-confirm-message { padding:6px 2px 14px; color:#334155; font-size:14px; line-height:1.8; white-space:pre-line; }
.action-confirm-actions { display:flex; justify-content:flex-end; gap:10px; padding-top:10px; border-top:1px solid #e2e8f0; }

/* 资金流水收付款类型 */
.flow-type { display:inline-block; padding:2px 9px; border-radius:10px; font-size:12px; font-weight:700; white-space:nowrap; }
.flow-receipt { background:#dcfce7; color:#047857; }
.flow-payment { background:#ffedd5; color:#c2410c; }

/* 最近收付款单搜索 */
.recent-search-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; margin:14px 0 8px; border:1px solid #e2e8f0; border-radius:8px; background:#f8fafc; }
.recent-search-bar input { padding:7px 9px; border:1px solid #cbd5e1; border-radius:6px; font-size:13px; }
.recent-search-bar input[name=q_party] { width:240px; }
.recent-search-bar input[name=q_danhao] { width:190px; }
.recent-list-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:14px 0 8px; }
.recent-list-head h3 { margin:0; font-size:14px; }
.recent-list-head span { font-size:12px; color:#94a3b8; }

/* 收付款单往来单位：客户名与公司名同一行 */
.hb-party-line { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.hb-party-line .hb-party-name { font-size:30px; }
.hb-party-line .hb-party-company { margin:0; font-size:16px; font-weight:600; color:#64748b; }

.merge-select-hint { font-style:normal; margin-left:6px; color:#64748b; }
.merge-select-hint.is-error { color:#dc2626; font-weight:600; }
.btn:disabled { opacity:.55; cursor:not-allowed; }

.reverse-hint { margin-left:8px; color:#b45309; font-size:12px; }

/* 出库单封存与明细 */
.sealed-banner { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:11px 16px; border-bottom:1px solid #fcd34d; background:linear-gradient(90deg,#fffbeb,#fef3c7); color:#92400e; font-size:13px; }
.sealed-banner strong { color:#b45309; font-size:14px; }
.sealed-banner a { color:#b45309; font-weight:700; text-decoration:underline; }
.sealed-badge { display:inline-block; margin-left:10px; padding:2px 8px; border-radius:10px; background:#fef3c7; color:#b45309; font-size:12px; font-weight:700; vertical-align:middle; }
.cg-sealed { border-color:#fcd34d; }
.cg-sealed .cg-hero { background:linear-gradient(135deg,#fffbeb,#fefce8); }
.chuku-detail-table thead th { background:#eef2f7; color:#0f172a; font-weight:700; }
.chuku-detail-table tbody td { color:#0f172a; font-weight:500; }
.chuku-detail-table tbody td:first-child { color:#0b1220; font-weight:700; }
.chuku-detail-table tbody tr:hover td { background:#f8fafc; }
.chuku-detail-table tbody tr + tr td { border-top:1px solid #e2e8f0; }
.row-sealed td { background:#fffbeb; }

/* 出库单详情重排 */
.cg-docline { margin-top:5px; font-size:15px; color:#334155; letter-spacing:.2px; }
.cg-docline strong { font-size:16px; color:#0f172a; }
.chuku-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.cg-settle { border-color:#bfdbfe; background:#eff6ff; }
.cg-settle strong { color:#1d4ed8; }
.cg-extra-links { display:flex; flex-wrap:wrap; gap:18px; padding:10px 20px 0; color:#64748b; font-size:13px; }
.cg-extra-links a { color:#2563eb; font-weight:600; }
.cg-summary { display:flex; align-items:flex-start; gap:6px; margin:12px 20px 0; padding:10px 14px; border:1px solid #e2e8f0; border-left:4px solid #f59e0b; border-radius:6px; background:#fffbeb; color:#334155; font-size:13px; line-height:1.7; }
.cg-summary strong { color:#92400e; }
.cg-summary-icon { font-size:15px; line-height:1.5; }
@media (max-width:900px){ .chuku-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px){ .chuku-metrics { grid-template-columns:1fr; } }

/* 出库单详情整体美化 */
.cg-detail { border-radius:14px; box-shadow:0 10px 28px rgba(15,23,42,.06); font-family:"Noto Sans SC","Microsoft YaHei","PingFang SC",system-ui,sans-serif; background:#fff; }
.cg-detail .cg-hero { padding:24px 26px 20px; }
.cg-detail .cg-supplier { font-size:30px; letter-spacing:.8px; line-height:1.2; }
.cg-detail .cg-meta { margin-top:5px; font-size:13px; color:#64748b; }
.cg-detail .cg-docline { margin-top:8px; font-size:14px; color:#475569; }
.cg-detail .cg-docline strong { font-size:16px; color:#0f172a; }
.cg-detail .cg-actions .btn { border-radius:8px; padding:8px 14px; font-size:13px; font-weight:600; }
.chuku-metrics { gap:14px; padding:20px 24px 8px; }
.cg-detail .chuku-metrics .cg-metric { padding:14px 16px; border-radius:12px; gap:7px; background:#fff; box-shadow:0 2px 8px rgba(15,23,42,.05); border-top-width:3px; border-top-style:solid; }
.cg-detail .chuku-metrics .cg-metric span { font-size:12px; font-weight:600; letter-spacing:.3px; }
.cg-detail .chuku-metrics .cg-metric strong { font-size:22px; font-variant-numeric:tabular-nums; }
.cg-detail .chuku-metrics .cg-amount strong { font-size:25px; }
.cg-detail .chuku-metrics .cg-status { border-top-color:#f97316; }
.cg-paid .chuku-metrics .cg-status { border-top-color:#10b981; }
.cg-unpaid .chuku-metrics .cg-status { border-top-color:#f97316; }
.cg-detail .chuku-metrics .cg-amount { border-top-color:#ef4444; }
.cg-detail .chuku-metrics .cg-tax { border-top-color:#3b82f6; }
.cg-detail .chuku-metrics .cg-settle { border-top-color:#0ea5e9; }
.cg-detail .cg-extra-links { padding:12px 24px 0; font-size:13px; }
.cg-detail .cg-summary { margin:16px 24px 0; padding:12px 16px; border-radius:10px; border-left:4px solid #f59e0b; font-size:13.5px; line-height:1.8; box-shadow:0 1px 4px rgba(15,23,42,.04); }
.cg-detail .cg-summary-icon { font-size:17px; }
.cg-detail .cg-section-title { margin:24px 24px 10px; padding-left:10px; font-size:15px; letter-spacing:.3px; }
.cg-detail .table-wrap { margin:0 24px; border-radius:10px; }
.cg-detail .chuku-detail-table thead th { padding:12px 10px; font-size:13px; letter-spacing:.2px; }
.cg-detail .chuku-detail-table tbody td { padding:11px 10px; font-size:13.5px; line-height:1.5; }
.cg-detail .view-voucher, .cg-detail .cg-voucher-extra { margin-left:24px; margin-right:24px; }
.cg-detail .cg-pay-actions { margin:16px 24px; }
@media (max-width:900px){ .cg-detail .cg-hero { padding:20px; } .cg-detail .cg-supplier { font-size:26px; } .chuku-metrics { padding:16px 20px 6px; } .cg-detail .cg-section-title, .cg-detail .cg-summary, .cg-detail .cg-extra-links { margin-left:20px; margin-right:20px; } .cg-detail .table-wrap { margin:0 20px; } }
@media (max-width:600px){ .cg-detail .cg-hero { flex-direction:column; } .cg-detail .cg-actions { justify-content:flex-start; } .cg-detail .cg-supplier { font-size:23px; } .cg-detail .chuku-metrics .cg-metric strong { font-size:20px; } }

/* 出库单详情：紧凑版 */
.cg-detail .cg-hero { padding:18px 22px 14px; }
.cg-detail .cg-supplier { font-size:26px; letter-spacing:.5px; }
.cg-detail .cg-meta { margin-top:3px; font-size:12px; }
.cg-detail .cg-docline { margin-top:6px; font-size:13px; }
.cg-detail .cg-docline strong { font-size:15px; cursor:copy; }
.cg-detail .cg-actions .btn { padding:7px 12px; font-size:12.5px; }
.chuku-metrics { gap:10px; padding:14px 22px 4px; }
.cg-detail .chuku-metrics .cg-metric { padding:10px 12px; border-radius:10px; gap:5px; }
.cg-detail .chuku-metrics .cg-metric span { font-size:11.5px; }
.cg-detail .chuku-metrics .cg-metric strong { font-size:19px; }
.cg-detail .chuku-metrics .cg-amount strong { font-size:21px; }
.cg-detail .cg-extra-links { padding:8px 22px 0; font-size:12.5px; }
.cg-detail .cg-summary { margin:10px 22px 0; padding:9px 12px; font-size:12.5px; line-height:1.65; border-radius:8px; }
.cg-detail .cg-summary-icon { font-size:15px; }
.cg-detail .cg-section-title { margin:18px 22px 8px; font-size:14px; }
.cg-detail .table-wrap { margin:0 22px; }
.cg-detail .chuku-detail-table thead th { padding:10px 9px; font-size:12.5px; }
.cg-detail .chuku-detail-table tbody td { padding:9px; font-size:13px; }
.cg-detail .view-voucher, .cg-detail .cg-voucher-extra { margin-left:22px; margin-right:22px; }
.cg-detail .cg-pay-actions { margin:12px 22px; }

.copy-toast { position:fixed; left:50%; bottom:40px; transform:translate(-50%,10px); z-index:99999; padding:8px 16px; border-radius:20px; background:rgba(15,23,42,.88); color:#fff; font-size:13px; opacity:0; pointer-events:none; transition:all .2s ease; }
.copy-toast.show { opacity:1; transform:translate(-50%,0); }
@media (max-width:600px){ .cg-detail .cg-supplier { font-size:23px; } .chuku-metrics { padding:12px 18px 4px; } }

/* 出库单详情最终紧凑美化 */
.cg-detail .cg-hero { align-items:center; padding:17px 22px 15px; }
.cg-detail .cg-supplier { font-size:25px; letter-spacing:.4px; }
.cg-detail .cg-meta { margin-top:4px; font-size:12px; color:#64748b; }
.cg-detail .cg-actions { align-items:center; }
.cg-detail .cg-actions .btn { box-shadow:0 1px 2px rgba(15,23,42,.04); }
.cg-detail .chuku-metrics { padding:13px 22px 3px; gap:9px; }
.cg-detail .chuku-metrics .cg-metric { padding:9px 11px; gap:4px; border-radius:9px; }
.cg-detail .chuku-metrics .cg-metric span { font-size:11px; }
.cg-detail .chuku-metrics .cg-metric strong { font-size:18px; }
.cg-detail .chuku-metrics .cg-amount strong { font-size:20px; }
.cg-detail .cg-summary { align-items:center; margin:10px 22px 0; padding:8px 12px; gap:8px; background:linear-gradient(90deg,#fffbeb,#fffdf5); }
.cg-detail .cg-summary-icon { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; flex:0 0 24px; border-radius:50%; background:#fef3c7; font-size:14px; }
.cg-detail .cg-summary strong { font-size:12.5px; }
.cg-detail .cg-section-title { margin:17px 22px 7px; padding-left:9px; font-size:13.5px; }
.cg-detail .table-wrap { margin:0 22px; }
.cg-detail .chuku-detail-table thead th { padding:9px 9px; font-size:12.5px; }
.cg-detail .chuku-detail-table tbody td { padding:8px 9px; font-size:12.5px; }
.cg-detail .cg-pay-actions { margin:12px 22px; }
.cg-detail .view-voucher, .cg-detail .cg-voucher-extra { margin-left:22px; margin-right:22px; }
@media (max-width:600px){ .cg-detail .cg-supplier { font-size:22px; } .cg-detail .cg-hero { padding:15px 18px 13px; } .cg-detail .cg-summary { margin:9px 18px 0; } .cg-detail .cg-section-title { margin-left:18px; margin-right:18px; } .cg-detail .table-wrap { margin:0 18px; } }

/* 出库单列表税别标签 */
.tax-tag { display:inline-block; padding:2px 9px; border-radius:10px; font-size:12px; font-weight:700; line-height:1.7; white-space:nowrap; border:1px solid transparent; }
.tax-invoiced { background:#f3e8ff; color:#7e22ce; border-color:#d8b4fe; }
.tax-included { background:#dbeafe; color:#1d4ed8; border-color:#bfdbfe; }
.tax-excluded { background:#f1f5f9; color:#64748b; border-color:#cbd5e1; }
.tag-invoiced { background:#f3e8ff; color:#7e22ce; }

/* 修改单据时禁止变更的往来单位输入框 */
input[readonly] { background:#f1f5f9 !important; color:#475569 !important; cursor:not-allowed; }

/* 新增出库单：客户醒目标识与库存卡片 */
.selected-customer-badge { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:8px; padding:8px 12px; border:1px solid #bfdbfe; border-left:4px solid #2563eb; border-radius:8px; background:linear-gradient(90deg,#eff6ff,#f8fbff); }
.selected-customer-label { font-size:11px; font-weight:700; letter-spacing:.5px; color:#2563eb; }
.selected-customer-badge strong { font-size:18px; color:#1e3a8a; line-height:1.3; }
.selected-customer-badge em { font-style:normal; font-size:12px; color:#64748b; }
#khSearch.customer-selected { background:#eff6ff !important; border-color:#60a5fa !important; color:#1e3a8a !important; font-weight:700; }
.stock-pick { min-width:300px; padding:10px 12px; border:1px solid #dbeafe; border-left:4px solid #3b82f6; border-radius:9px; background:#fff; box-shadow:0 2px 8px rgba(15,23,42,.05); }
.stock-pick-name { font-size:14px; font-weight:700; color:#0f172a; }
.stock-pick-spec { display:inline-flex; align-items:baseline; gap:6px; margin-top:5px; padding:2px 8px; border-radius:5px; background:#eff6ff; color:#1d4ed8; font-size:11px; }
.stock-pick-spec b { font-size:14px; letter-spacing:.2px; color:#1e3a8a; }
.stock-pick-qty { display:flex; align-items:baseline; gap:3px; margin-top:5px; color:#64748b; font-size:11px; }
.stock-pick-qty strong { font-size:18px; line-height:1.1; color:#047857; font-variant-numeric:tabular-nums; }
.stock-pick-qty i { font-style:normal; margin:0 2px; color:#94a3b8; }
.stock-pick-meta { margin-top:3px; font-size:11px; color:#94a3b8; }

/* 新增出库单：紧凑库存卡片 */
.stock-pick { min-width:260px; padding:8px 10px; border-left-width:3px; border-radius:8px; }
.stock-pick-name { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; font-size:13px; line-height:1.4; }
.stock-spec-inline { display:inline-block; padding:1px 6px; border-radius:4px; background:#eff6ff; color:#1d4ed8; font-size:12px; font-weight:700; }
.stock-pick-qty { display:flex; align-items:baseline; gap:3px; margin-top:3px; color:#64748b; font-size:11px; line-height:1.4; }
.stock-pick-qty strong { font-size:16px; color:#047857; }
.stock-pick-qty i { margin:0 2px; }
.stock-warehouse { font-style:normal; margin-left:auto; padding-left:8px; color:#94a3b8; font-size:10.5px; }
.stock-pick { transition:background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.stock-pick-active { background:#ecfdf5 !important; border-color:#10b981 !important; border-left-color:#059669 !important; box-shadow:0 0 0 3px rgba(16,185,129,.16), 0 4px 12px rgba(5,150,105,.12) !important; }

/* 出库单详情最终设计 */
.cg-detail { border:1px solid #e2e8f0; border-top-width:4px; border-radius:16px; background:#fff; box-shadow:0 14px 34px rgba(15,23,42,.08); }
.cg-detail.cg-paid { border-top-color:#10b981; }
.cg-detail.cg-unpaid { border-top-color:#f59e0b; }
.cg-detail .cg-hero { padding:20px 24px 17px; border-bottom:1px solid #e2e8f0; align-items:center; }
.cg-detail.cg-paid .cg-hero { background:linear-gradient(120deg,#ecfdf5 0%,#f7fffb 65%,#fff 100%); }
.cg-detail.cg-unpaid .cg-hero { background:linear-gradient(120deg,#fffbeb 0%,#fffdf5 65%,#fff 100%); }
.cg-detail .cg-supplier { font-size:27px; letter-spacing:.6px; line-height:1.25; }
.cg-detail .cg-meta { margin-top:4px; font-size:12px; color:#64748b; }
.cg-detail .cg-actions { gap:7px; }
.cg-detail .cg-actions .btn { background:#fff; border-color:#dbe3ec; box-shadow:0 1px 3px rgba(15,23,42,.05); }
.cg-detail .cg-actions .btn:hover { border-color:#94a3b8; background:#f8fafc; }
.cg-detail .cg-actions .btn-danger { color:#dc2626; border-color:#fecaca; }
.cg-detail .cg-actions .btn-warn { color:#fff; background:#ea580c; border-color:#ea580c; }
.cg-detail .cg-actions .btn-warn:hover { background:#c2410c; border-color:#c2410c; }
.chuku-metrics { padding:16px 24px 4px; gap:12px; }
.cg-detail .chuku-metrics .cg-metric { padding:11px 13px; border-radius:11px; gap:5px; box-shadow:0 2px 7px rgba(15,23,42,.04); }
.cg-detail .chuku-metrics .cg-metric span { font-size:11px; font-weight:700; color:#64748b; }
.cg-detail .chuku-metrics .cg-metric strong { font-size:20px; }
.cg-detail .chuku-metrics .cg-status { background:#fff7ed; border-color:#fed7aa; border-top-color:#f59e0b; }
.cg-detail .chuku-metrics .cg-status strong { color:#c2410c; }
.cg-detail.cg-paid .chuku-metrics .cg-status { background:#ecfdf5; border-color:#bbf7d0; border-top-color:#10b981; }
.cg-detail.cg-paid .chuku-metrics .cg-status strong { color:#047857; }
.cg-detail .chuku-metrics .cg-amount { background:#fef2f2; border-color:#fecaca; border-top-color:#ef4444; }
.cg-detail .chuku-metrics .cg-amount strong { color:#b91c1c; font-size:22px; }
.cg-detail .chuku-metrics .cg-tax { background:#eff6ff; border-color:#bfdbfe; border-top-color:#3b82f6; }
.cg-detail .chuku-metrics .cg-tax strong { color:#1d4ed8; }
.cg-detail .chuku-metrics .cg-settle { background:#ecfeff; border-color:#a5f3fc; border-top-color:#06b6d4; }
.cg-detail .chuku-metrics .cg-settle strong { color:#0e7490; }
.cg-detail .cg-extra-links { padding:10px 24px 0; font-size:12.5px; }
.cg-detail .cg-summary { margin:12px 24px 0; padding:10px 14px; border:1px solid #fde68a; border-left:4px solid #f59e0b; border-radius:9px; background:linear-gradient(90deg,#fffbeb,#fffdf6); box-shadow:none; color:#334155; font-size:13px; }
.cg-detail .cg-summary-icon { width:23px; height:23px; flex-basis:23px; background:#fef3c7; font-size:13px; }
.cg-detail .cg-section-title { display:flex; align-items:center; gap:8px; margin:22px 24px 9px; padding-left:0; border-left:0; font-size:14px; color:#1e293b; }
.cg-detail .cg-section-title::before { content:''; width:4px; height:16px; border-radius:2px; background:#f59e0b; flex:0 0 4px; }
.cg-detail.cg-paid .cg-section-title::before { background:#10b981; }
.cg-detail .table-wrap { margin:0 24px; border:1px solid #e2e8f0; border-radius:10px; overflow:hidden; }
.cg-detail .chuku-detail-table { border-collapse:separate; border-spacing:0; }
.cg-detail .chuku-detail-table thead th { padding:10px 9px; background:#334155; color:#fff; border-bottom:1px solid #334155; font-size:12.5px; font-weight:700; letter-spacing:.2px; }
.cg-detail .chuku-detail-table tbody td { padding:9px; background:#fff; color:#1e293b; font-size:13px; font-weight:600; border-bottom:1px solid #eef2f7; }
.cg-detail .chuku-detail-table tbody tr:nth-child(even) td { background:#f8fafc; }
.cg-detail .chuku-detail-table tbody tr:hover td { background:#eff6ff; }
.cg-detail .chuku-detail-table tbody td:first-child { color:#0f172a; font-weight:800; font-size:13.5px; }
.cg-detail .chuku-detail-table tbody td:nth-child(3), .cg-detail .chuku-detail-table tbody td:nth-child(4) { color:#0f172a; font-weight:800; font-size:13.5px; font-variant-numeric:tabular-nums; }
.cg-detail .chuku-detail-table tbody td:nth-child(7) { color:#b91c1c; font-weight:800; font-variant-numeric:tabular-nums; }
.cg-detail .chuku-detail-table tfoot th { padding:10px 9px; background:#f1f5f9; color:#0f172a; font-size:12.5px; font-weight:800; border-top:1px solid #cbd5e1; }
.cg-detail .chuku-detail-table tfoot th:nth-child(7) { color:#b91c1c; }
.cg-detail .cg-pay-actions { margin:14px 24px; padding:12px 14px; border:1px solid #bbf7d0; border-radius:10px; background:#f0fdf4; }
.cg-detail .view-voucher, .cg-detail .cg-voucher-extra { margin:0 24px 18px; padding:10px 12px; border:1px dashed #cbd5e1; border-radius:8px; background:#f8fafc; }
@media (max-width:900px){ .cg-detail .cg-hero { padding:17px 19px; } .cg-detail .cg-supplier { font-size:24px; } .cg-detail .cg-summary, .cg-detail .cg-section-title, .cg-detail .cg-extra-links { margin-left:19px; margin-right:19px; } .cg-detail .table-wrap { margin:0 19px; } .cg-detail .view-voucher, .cg-detail .cg-voucher-extra { margin-left:19px; margin-right:19px; } }
@media (max-width:600px){ .cg-detail .cg-supplier { font-size:22px; } .cg-detail .chuku-metrics .cg-metric strong { font-size:19px; } .cg-detail .chuku-detail-table thead th, .cg-detail .chuku-detail-table tbody td, .cg-detail .chuku-detail-table tfoot th { padding:7px 6px; font-size:11.5px; } }

/* 出库明细表最终配色 */
.cg-detail .chuku-detail-table thead th { background:linear-gradient(180deg,#3b4a5f 0%,#253244 100%); color:#f8fafc; border-bottom:0; font-weight:600; letter-spacing:.4px; }
.cg-detail .chuku-detail-table tbody td { color:#334155; font-weight:500; background:#fff; border-bottom:1px solid #eef2f7; }
.cg-detail .chuku-detail-table tbody tr:nth-child(even) td { background:#fbfcfe; }
.cg-detail .chuku-detail-table tbody tr:hover td { background:#fff7ed; }
.cg-detail.cg-paid .chuku-detail-table tbody tr:hover td { background:#ecfdf5; }
.cg-detail .chuku-detail-table tbody td:first-child { color:#0f172a; font-weight:800; font-size:13.5px; }
.cg-detail .chuku-detail-table tbody td:nth-child(2) { color:#475569; }
.cg-detail .chuku-detail-table tbody td:nth-child(3), .cg-detail .chuku-detail-table tbody td:nth-child(4) { color:#0f172a; font-weight:800; font-size:13.5px; }
.cg-detail .chuku-detail-table tbody td:nth-child(5) { color:#64748b; }
.cg-detail .chuku-detail-table tbody td:nth-child(6) { color:#475569; font-variant-numeric:tabular-nums; }
.cg-detail .chuku-detail-table tbody td:nth-child(7) { color:#b45309; font-weight:800; font-size:13.5px; font-variant-numeric:tabular-nums; }
.cg-detail.cg-paid .chuku-detail-table tbody td:nth-child(7) { color:#047857; }
.cg-detail .chuku-detail-table tbody td:nth-child(8) { color:#64748b; font-size:12.5px; font-weight:400; }
.cg-detail .chuku-detail-table tfoot th { background:#f1f5f9; color:#0f172a; border-top:1px solid #cbd5e1; font-weight:800; }
.cg-detail .chuku-detail-table tfoot th:nth-child(5) { color:#b45309; }
.cg-detail.cg-paid .chuku-detail-table tfoot th:nth-child(5) { color:#047857; }
.cg-detail .chuku-detail-table tfoot th:nth-child(1) { color:#475569; font-weight:700; }

/* 出库明细表：简洁主题色风格（无状态列） */
.cg-detail .table-wrap { border-color:#e2e8f0; border-radius:12px; }
.cg-detail .chuku-detail-table thead th { padding:11px 12px; background:#f8fafc; color:#475569; border:0; border-bottom:2px solid #f59e0b; text-align:center; font-size:12.5px; font-weight:700; letter-spacing:.3px; }
.cg-detail.cg-paid .chuku-detail-table thead th { background:#f0fdf4; color:#166534; border-bottom-color:#10b981; }
.cg-detail.cg-unpaid .chuku-detail-table thead th { background:#fffbeb; color:#92400e; }
.cg-detail .chuku-detail-table tbody td { padding:11px 12px; background:#fff; color:#334155; border-bottom:1px solid #f1f5f9; text-align:center; font-size:13px; font-weight:500; }
.cg-detail .chuku-detail-table tbody tr:hover td { background:#fff7ed; }
.cg-detail.cg-paid .chuku-detail-table tbody tr:hover td { background:#ecfdf5; }
.cg-detail .chuku-detail-table tbody td.ck-index { width:52px; color:#94a3b8; font-size:12px; font-weight:600; }
.cg-detail .chuku-detail-table tbody td.ck-product { text-align:left; padding-left:16px; color:#0f172a; font-size:13.5px; font-weight:800; }
.cg-detail .chuku-detail-table tbody td.ck-spec { text-align:left; color:#64748b; font-size:12.5px; }
.cg-detail .chuku-detail-table tbody td:nth-child(4), .cg-detail .chuku-detail-table tbody td:nth-child(5) { color:#0f172a; font-weight:800; font-size:13.5px; font-variant-numeric:tabular-nums; }
.cg-detail .chuku-detail-table tbody td:nth-child(6) { color:#64748b; }
.cg-detail .chuku-detail-table tbody td:nth-child(7) { color:#475569; font-variant-numeric:tabular-nums; }
.cg-detail .chuku-detail-table tbody td.ck-amount { color:#b45309; font-size:13.5px; font-weight:800; font-variant-numeric:tabular-nums; }
.cg-detail.cg-paid .chuku-detail-table tbody td.ck-amount { color:#047857; }
.cg-detail .chuku-detail-table tbody td.ck-note { color:#94a3b8; font-size:12px; font-weight:400; }
.cg-detail .chuku-detail-table tfoot th { padding:11px 12px; background:#fffbeb; color:#92400e; border-top:1px solid #fcd34d; text-align:center; font-size:12.5px; font-weight:800; }
.cg-detail.cg-paid .chuku-detail-table tfoot th { background:#f0fdf4; color:#166534; border-top-color:#a7f3d0; }
.cg-detail .chuku-detail-table tfoot th:nth-child(1) { text-align:right; color:#78350f; }
.cg-detail.cg-paid .chuku-detail-table tfoot th:nth-child(1) { color:#166534; }
.cg-detail .chuku-detail-table tfoot th:nth-child(5) { color:#b45309; font-size:13px; font-variant-numeric:tabular-nums; }
.cg-detail.cg-paid .chuku-detail-table tfoot th:nth-child(5) { color:#047857; }

/* 出库综合查询独立窗口 */
.chuku-query-body { margin:0; padding:18px; background:#eef2f7; font-family:"Noto Sans SC","Microsoft YaHei","PingFang SC",system-ui,sans-serif; color:#334155; }
.chuku-query-shell { max-width:1400px; margin:0 auto; background:#fff; border:1px solid #e2e8f0; border-radius:14px; box-shadow:0 12px 30px rgba(15,23,42,.07); overflow:hidden; }
.chuku-query-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:18px 22px 14px; background:linear-gradient(120deg,#eff6ff,#f8fbff); border-bottom:1px solid #dbeafe; }
.chuku-query-head h1 { margin:0; font-size:21px; color:#1e3a8a; letter-spacing:.5px; }
.chuku-query-head p { margin:5px 0 0; font-size:12.5px; color:#64748b; }
.chuku-query-filter { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:13px 22px; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.chuku-query-filter input, .chuku-query-filter select { padding:7px 9px; border:1px solid #cbd5e1; border-radius:6px; font-size:13px; background:#fff; }
.chuku-query-filter input[name=kh] { width:210px; }
.chuku-query-filter input[name=product] { width:140px; }
.chuku-query-filter input[name=guige] { width:120px; }
.chuku-query-date { color:#64748b; font-size:12px; }
.chuku-query-summary { display:flex; gap:22px; flex-wrap:wrap; padding:11px 22px; font-size:13px; color:#64748b; border-bottom:1px solid #eef2f7; }
.chuku-query-summary b { color:#0f172a; font-size:15px; }
.chuku-query-table-wrap { padding:0 22px; overflow:auto; }
.chuku-query-table { width:100%; min-width:980px; margin:12px 0; border:1px solid #e2e8f0; border-radius:10px; overflow:hidden; }
.chuku-query-table thead th { background:linear-gradient(90deg,#2563eb,#1d4ed8); color:#fff; padding:10px 9px; font-size:12.5px; font-weight:700; border:0; text-align:center; }
.chuku-query-table tbody td { padding:10px 9px; font-size:12.5px; text-align:center; border-bottom:1px solid #eef2f7; }
.chuku-query-table tbody tr:hover td { background:#f5f9ff; }
.chuku-query-table tbody td:nth-child(2), .chuku-query-table tbody td:nth-child(4), .chuku-query-table tbody td:nth-child(8) { text-align:left; }
.chuku-query-table tbody td a { color:#2563eb; font-weight:700; }
.chuku-query-table tbody td small { display:block; color:#94a3b8; font-size:11px; margin-top:2px; }
.chuku-query-table tbody td.num { text-align:right; font-variant-numeric:tabular-nums; }
.chuku-query-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; padding:0 22px 18px; font-size:13px; color:#64748b; }
.chuku-query-actions b { color:#0f172a; }
@media (max-width:760px){ .chuku-query-head { flex-direction:column; } .chuku-query-filter { align-items:flex-start; } .chuku-query-filter input[name=kh], .chuku-query-filter input[name=product], .chuku-query-filter input[name=guige] { width:100%; } }

/* 出库综合查询：默认空状态与明细表 */
.chuku-query-empty { padding:62px 20px 72px; text-align:center; color:#64748b; }
.chuku-query-empty-icon { font-size:34px; line-height:1; margin-bottom:12px; }
.chuku-query-empty h2 { margin:0 0 8px; font-size:17px; color:#334155; }
.chuku-query-empty p { margin:0; font-size:13px; }
.chuku-query-detail-table { min-width:1250px; }
.chuku-query-detail-table thead th { white-space:nowrap; }
.chuku-query-detail-table tbody td { white-space:nowrap; }
.chuku-query-detail-table tbody td.query-product { text-align:left; color:#0f172a; font-weight:700; }
.chuku-query-detail-table tbody td.query-note { text-align:left; color:#94a3b8; font-size:12px; }
.chuku-query-detail-table tbody td.chuku-query-amount { color:#b45309; font-weight:700; }
.chuku-query-detail-table tbody tr:hover td { background:#f5f9ff; }
.chuku-query-detail-table tbody td small { display:block; color:#94a3b8; font-size:11px; margin-top:2px; }
.chuku-query-customer { position:relative; }
.chuku-query-customer input[name=kh_name] { width:250px; }

/* 出库综合查询：内嵌弹窗，无浏览器边框 */
.chuku-query-modal-box { width:min(1280px,96vw); max-width:96vw; height:88vh; max-height:88vh; padding:0; overflow:hidden; border-radius:12px; background:#eef2f7; }
.chuku-query-modal-box iframe { display:block; width:100%; height:100%; border:0; background:#eef2f7; }
.chuku-query-body.embed { padding:0; background:#eef2f7; }
.chuku-query-body.embed .chuku-query-shell { max-width:none; height:100%; border:0; border-radius:0; box-shadow:none; }
.chuku-query-body.embed .chuku-query-head { padding-left:18px; padding-right:18px; }
.chuku-query-body.embed .chuku-query-table-wrap { overflow-x:hidden; }
.chuku-query-table.chuku-query-detail-table { min-width:0; width:100%; table-layout:fixed; }
.chuku-query-detail-table th, .chuku-query-detail-table td { padding:7px 5px; font-size:11.5px; white-space:normal; word-break:break-all; }
.chuku-query-detail-table thead th { font-size:11px; line-height:1.35; }
.chuku-query-detail-table th:nth-child(1) { width:34px; }
.chuku-query-detail-table th:nth-child(2) { width:102px; }
.chuku-query-detail-table th:nth-child(3) { width:74px; }
.chuku-query-detail-table th:nth-child(4) { width:95px; }
.chuku-query-detail-table th:nth-child(5) { width:56px; }
.chuku-query-detail-table th:nth-child(6) { width:108px; }
.chuku-query-detail-table th:nth-child(7) { width:80px; }
.chuku-query-detail-table th:nth-child(8), .chuku-query-detail-table th:nth-child(9) { width:42px; }
.chuku-query-detail-table th:nth-child(10) { width:38px; }
.chuku-query-detail-table th:nth-child(11) { width:56px; }
.chuku-query-detail-table th:nth-child(12) { width:62px; }
.chuku-query-detail-table th:nth-child(13) { width:92px; }
.chuku-query-detail-table th:nth-child(14) { width:58px; }
.chuku-query-detail-table th:nth-child(14) { width:58px; }
.chuku-query-detail-table tbody td { text-align:center; }
.chuku-query-detail-table tbody td.num { text-align:right; white-space:nowrap; }
.chuku-query-detail-table tbody td:nth-child(2) a { word-break:break-all; }

/* 出库综合查询：单号移到最后，普通文字显示 */
.chuku-query-detail-table th:nth-child(2) { width:74px; }
.chuku-query-detail-table th:nth-child(3) { width:95px; }
.chuku-query-detail-table th:nth-child(4) { width:56px; }
.chuku-query-detail-table th:nth-child(5) { width:108px; }
.chuku-query-detail-table th:nth-child(6) { width:80px; }
.chuku-query-detail-table th:nth-child(7), .chuku-query-detail-table th:nth-child(8) { width:42px; }
.chuku-query-detail-table th:nth-child(9) { width:38px; }
.chuku-query-detail-table th:nth-child(10) { width:56px; }
.chuku-query-detail-table th:nth-child(11) { width:62px; }
.chuku-query-detail-table th:nth-child(12) { width:92px; }
.chuku-query-detail-table th:nth-child(13) { width:58px; }
.chuku-query-detail-table th:nth-child(14) { width:102px; }
.chuku-query-detail-table tbody td:nth-child(2) { text-align:center; }
.chuku-query-detail-table tbody td:nth-child(3), .chuku-query-detail-table tbody td:nth-child(5) { text-align:left; }
.chuku-query-detail-table tbody td:nth-child(4) { text-align:center; }
.chuku-query-detail-table tbody td:nth-child(12) { text-align:left; }
.chuku-query-detail-table tbody td:nth-child(14) { text-align:center; color:#64748b; font-size:11.5px; font-weight:400; white-space:normal; }
.kucun-customer-filter input { width:220px; }

/* 采购入库综合查询 */
.caigou-query-detail-table { min-width:0; width:100%; table-layout:fixed; }
.caigou-query-detail-table th, .caigou-query-detail-table td { padding:7px 5px; font-size:11.5px; white-space:normal; word-break:break-all; }
.caigou-query-detail-table thead th { font-size:11px; line-height:1.35; white-space:normal; }
.caigou-query-detail-table th:nth-child(1) { width:74px; }
.caigou-query-detail-table th:nth-child(2) { width:120px; }
.caigou-query-detail-table th:nth-child(3) { width:56px; }
.caigou-query-detail-table th:nth-child(4) { width:130px; }
.caigou-query-detail-table th:nth-child(5) { width:90px; }
.caigou-query-detail-table th:nth-child(6) { width:55px; }
.caigou-query-detail-table th:nth-child(7) { width:40px; }
.caigou-query-detail-table th:nth-child(8) { width:65px; }
.caigou-query-detail-table th:nth-child(9) { width:80px; }
.caigou-query-detail-table th:nth-child(10) { width:100px; }
.caigou-query-detail-table th:nth-child(11) { width:60px; }
.caigou-query-detail-table th:nth-child(12) { width:110px; }
.caigou-query-detail-table tbody td { text-align:center; }
.caigou-query-detail-table tbody td:nth-child(2), .caigou-query-detail-table tbody td:nth-child(4), .caigou-query-detail-table tbody td:nth-child(10) { text-align:left; }
.caigou-query-detail-table tbody td.num { text-align:right; white-space:nowrap; }
.supplier-company { display:block; color:#94a3b8; font-size:11px; margin-top:2px; font-weight:400; }

/* 采购入库综合查询独立页面与价格趋势 */
.caigou-query-page .card { margin-top: 12px; }
.caigou-query-desc { margin: 4px 0 0; color: #64748b; font-size: 12px; }
.caigou-query-filter { border: 1px solid #e2e8f0; border-radius: 8px; margin: 12px 18px; }
.caigou-query-table-wrap { overflow-x: hidden; }
.caigou-query-detail-table { min-width: 0; width: 100%; table-layout: fixed; }
.caigou-query-detail-table th, .caigou-query-detail-table td { padding: 7px 5px; font-size: 11.5px; white-space: normal; word-break: break-all; }
.caigou-query-detail-table thead th { font-size: 11px; line-height: 1.35; white-space: normal; }
.caigou-query-detail-table th:nth-child(1) { width:74px; }
.caigou-query-detail-table th:nth-child(2) { width:120px; }
.caigou-query-detail-table th:nth-child(3) { width:56px; }
.caigou-query-detail-table th:nth-child(4) { width:90px; }
.caigou-query-detail-table th:nth-child(5) { width:120px; }
.caigou-query-detail-table th:nth-child(6) { width:80px; }
.caigou-query-detail-table th:nth-child(7) { width:55px; }
.caigou-query-detail-table th:nth-child(8) { width:40px; }
.caigou-query-detail-table th:nth-child(9) { width:65px; }
.caigou-query-detail-table th:nth-child(10) { width:80px; }
.caigou-query-detail-table th:nth-child(11) { width:95px; }
.caigou-query-detail-table th:nth-child(12) { width:60px; }
.caigou-query-detail-table th:nth-child(13) { width:110px; }
.caigou-query-detail-table tbody td { text-align:center; }
.caigou-query-detail-table tbody td:nth-child(2), .caigou-query-detail-table tbody td:nth-child(5), .caigou-query-detail-table tbody td:nth-child(11) { text-align:left; }
.caigou-query-detail-table tbody td:nth-child(4) { text-align:center; }
.caigou-query-detail-table tbody td.num { text-align:right; white-space:nowrap; }
.caigou-trend-card { margin: 18px; padding: 18px; border: 1px solid #dbeafe; border-radius: 12px; background: linear-gradient(160deg,#f8fbff,#ffffff); }
.caigou-trend-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:10px; }
.caigou-trend-head h3 { margin:0; font-size:16px; color:#1e3a8a; }
.caigou-trend-head p { margin:4px 0 0; font-size:12px; color:#64748b; }
.caigou-trend-picker { display:flex; align-items:center; gap:7px; font-size:12px; color:#64748b; white-space:nowrap; }
.caigou-trend-picker select { padding:6px 9px; border:1px solid #cbd5e1; border-radius:6px; background:#fff; font-size:12px; }
.caigou-trend-chart { background:#fff; border:1px solid #eef2f7; border-radius:10px; padding:8px 6px 0; overflow:hidden; }
.caigou-trend-svg { display:block; width:100%; height:auto; }
.caigou-trend-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:12px; }
.caigou-trend-stats div { background:#fff; border:1px solid #e2e8f0; border-radius:8px; padding:9px 12px; }
.caigou-trend-stats span { display:block; color:#64748b; font-size:11.5px; margin-bottom:3px; }
.caigou-trend-stats b { color:#0f172a; font-size:14px; }
.caigou-trend-stats b.up { color:#dc2626; }
.caigou-trend-stats b.down { color:#059669; }
@media (max-width:900px){ .caigou-trend-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .caigou-trend-head { flex-direction:column; } }

/* 采购价格趋势按钮与弹窗 */
.caigou-trend-trigger { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:18px; padding:14px 16px; border:1px solid #dbeafe; border-radius:10px; background:linear-gradient(160deg,#f8fbff,#fff); }
.caigou-trend-trigger strong { display:block; color:#1e3a8a; font-size:14px; margin-bottom:3px; }
.caigou-trend-trigger span { color:#64748b; font-size:12px; }
.caigou-trend-modal { width:min(1100px,96vw); max-width:96vw; max-height:90vh; overflow:auto; padding:20px; }
.caigou-trend-modal .modal-close { float:right; }
.caigou-trend-modal .caigou-trend-head { margin-bottom:12px; }

/* 采购综合查询数量统计 */
.caigou-qty-units { color:#64748b; font-weight:400; font-size:11px; }
.caigou-qty-card { margin:14px 18px 18px; border:1px solid #e2e8f0; border-radius:10px; background:#fff; overflow:hidden; }
.caigou-qty-head { display:flex; align-items:baseline; gap:10px; padding:11px 14px; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.caigou-qty-head h3 { margin:0; font-size:14px; color:#1e3a8a; }
.caigou-qty-head span { color:#94a3b8; font-size:11.5px; }
.caigou-qty-table { width:100%; table-layout:fixed; }
.caigou-qty-table th, .caigou-qty-table td { padding:7px 10px; font-size:12px; }
.caigou-qty-table th:nth-child(1) { width:42%; text-align:left; }
.caigou-qty-table th:nth-child(2) { width:16%; }
.caigou-qty-table th:nth-child(3), .caigou-qty-table th:nth-child(4) { width:21%; text-align:right; }
.caigou-qty-table tbody td:first-child { text-align:left; }
.caigou-qty-table tbody td.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.caigou-amount-breakdown { display:block; margin-top:7px; color:#475569; font-size:15px; font-weight:600; line-height:1.8; }
.caigou-amount-breakdown b { color:#0f172a; font-size:15px; font-weight:700; }
.caigou-summary-line { display:flex; flex-wrap:nowrap; align-items:center; gap:0; white-space:nowrap; overflow-x:auto; padding:12px 18px; margin:0 18px 10px; border:1px solid #e2e8f0; border-radius:9px; background:#f8fafc; font-size:13px; }
.caigou-summary-item { display:inline-flex; align-items:baseline; gap:5px; padding:0 14px; border-right:1px solid #e2e8f0; white-space:nowrap; }
.caigou-summary-item:first-child { padding-left:0; }
.caigou-summary-item:last-child { border-right:0; padding-right:0; }
.caigou-summary-item em { font-style:normal; color:#64748b; font-size:12px; }
.caigou-summary-item b { color:#0f172a; font-size:14px; font-weight:700; }
.caigou-summary-item small { color:#94a3b8; font-size:11px; }
.caigou-summary-item.tax b { color:#b45309; }
.caigou-summary-line::-webkit-scrollbar { height:0; }

/* 采购统计单行固定宽度：窗口缩放时项目不收缩、不挤压变形 */
.caigou-summary-line { width:auto; max-width:calc(100% - 36px); box-sizing:border-box; min-width:0; flex-wrap:nowrap; overflow-y:hidden; }
.caigou-summary-item { flex:0 0 auto; }
.caigou-summary-item em, .caigou-summary-item b, .caigou-summary-item small { flex:0 0 auto; white-space:nowrap; }
.chuku-query-page .chuku-query-shell { margin:0; max-width:none; }
.chuku-query-summary .chuku-received b { color:#059669; }
.chuku-query-summary .chuku-receivable b { color:#b45309; }
.log-batch-bar { display:flex; align-items:center; gap:12px; padding:10px 0 4px; color:#64748b; font-size:12px; }
.log-batch-bar b { color:#0f172a; }

/* 代加工入库综合查询 */
.ruku-query-table-wrap, .zhuangche-query-table-wrap { overflow-x:hidden; }
.ruku-query-detail-table { min-width:0; width:100%; table-layout:fixed; }
.ruku-query-detail-table th, .ruku-query-detail-table td { padding:7px 5px; font-size:11.5px; white-space:normal; word-break:break-all; }
.ruku-query-detail-table thead th { font-size:11px; line-height:1.35; }
.ruku-query-detail-table th:nth-child(1){width:72px}.ruku-query-detail-table th:nth-child(2){width:105px}.ruku-query-detail-table th:nth-child(3){width:72px}.ruku-query-detail-table th:nth-child(4){width:70px}.ruku-query-detail-table th:nth-child(5){width:78px}.ruku-query-detail-table th:nth-child(6){width:110px}.ruku-query-detail-table th:nth-child(7){width:78px}.ruku-query-detail-table th:nth-child(8){width:75px}.ruku-query-detail-table th:nth-child(9),.ruku-query-detail-table th:nth-child(10){width:48px}.ruku-query-detail-table th:nth-child(11){width:40px}.ruku-query-detail-table th:nth-child(12){width:58px}.ruku-query-detail-table th:nth-child(13){width:82px}.ruku-query-detail-table th:nth-child(14){width:105px}
.ruku-query-detail-table tbody td { text-align:center; }
.ruku-query-detail-table tbody td:nth-child(2),.ruku-query-detail-table tbody td:nth-child(6),.ruku-query-detail-table tbody td:nth-child(13){text-align:left}
.ruku-query-detail-table tbody td.num { text-align:right; white-space:nowrap; }
/* 装车综合查询 */
.zhuangche-query-detail-table { min-width:0; width:100%; table-layout:fixed; }
.zhuangche-query-detail-table th, .zhuangche-query-detail-table td { padding:7px 5px; font-size:11.5px; white-space:normal; word-break:break-all; }
.zhuangche-query-detail-table thead th { font-size:11px; line-height:1.35; }
.zhuangche-query-detail-table th:nth-child(1){width:90px}.zhuangche-query-detail-table th:nth-child(2){width:105px}.zhuangche-query-detail-table th:nth-child(3){width:75px}.zhuangche-query-detail-table th:nth-child(4){width:82px}.zhuangche-query-detail-table th:nth-child(5){width:110px}.zhuangche-query-detail-table th:nth-child(6){width:80px}.zhuangche-query-detail-table th:nth-child(7),.zhuangche-query-detail-table th:nth-child(8){width:48px}.zhuangche-query-detail-table th:nth-child(9){width:40px}.zhuangche-query-detail-table th:nth-child(10){width:105px}.zhuangche-query-detail-table th:nth-child(11){width:60px}.zhuangche-query-detail-table th:nth-child(12){width:82px}.zhuangche-query-detail-table th:nth-child(13){width:100px}
.zhuangche-query-detail-table tbody td { text-align:center; }
.zhuangche-query-detail-table tbody td:nth-child(2),.zhuangche-query-detail-table tbody td:nth-child(5),.zhuangche-query-detail-table tbody td:nth-child(12){text-align:left}
.zhuangche-query-detail-table tbody td.num { text-align:right; white-space:nowrap; }
.ticket-tabs { margin-bottom:14px; }
.ticket-section-title { font-size:14px; color:#334155; margin:18px 0 8px; }
.ticket-step-title { font-size:15px; font-weight:700; color:#1e3a8a; margin:4px 0 12px; }
.ticket-total { margin:12px 0; font-size:14px; color:#475569; }
.ticket-total b { color:#b45309; }
.ticket-invoice-upload { margin-top:16px; padding:14px; border:1px dashed #cbd5e1; border-radius:8px; background:#f8fafc; }
.ticket-receipt-upload { background:#fff7ed; border-color:#fb923c; border-left:4px solid #ea580c; }
.ticket-receipt-upload .ticket-required-label, .ticket-receipt-upload .ticket-danger { color:#dc2626; font-weight:700; }
.action-confirm-icon { width:48px; height:48px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:25px; margin:2px 0 12px; }
.action-confirm-icon.level-danger { background:#fee2e2; color:#dc2626; }
.action-confirm-icon.level-warning { background:#ffedd5; color:#ea580c; }
.action-confirm-icon.level-info { background:#dbeafe; color:#2563eb; }
.action-confirm-icon.level-success { background:#dcfce7; color:#059669; }
.action-confirm-message { white-space:pre-line; }
#zcStockTable td { color:#1d4ed8; }
#zcQtyModal input:focus { background:#fef08a !important; }
.summary-link { display:inline-block; max-width:17em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom; color:#2563eb; text-decoration:none; border-bottom:1px dashed #93c5fd; cursor:pointer; }
.summary-link:hover { color:#1d4ed8; border-bottom-color:#1d4ed8; }
.summary-modal-head { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:0 0 10px; color:#475569; }
.summary-add-form { padding:10px 12px; margin:0 0 12px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; }
.summary-add-form textarea { width:100%; box-sizing:border-box; padding:8px; border:1px solid #cbd5e1; border-radius:6px; font:inherit; resize:vertical; }
.summary-link.summary-empty { color:#94a3b8; border-bottom-color:#cbd5e1; }
.summary-link.summary-empty:hover { color:#2563eb; }
.data td.amount-cell { color:#c2410c !important; font-weight:700; font-size:14px; }
.data tfoot td.amount-cell { color:#b45309 !important; }
/* ===== 单据详情 V2：深色单据头 + 指标卡 + 分区内容 ===== */
.doc-v2 {
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .14);
}
.doc-v2 .cg-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 26px 30px 48px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 62%, #2563eb 100%);
  color: #fff;
}
.doc-v2-purchase .cg-hero { background: linear-gradient(135deg, #052e16 0%, #166534 58%, #16a34a 100%); }
.doc-v2-in .cg-hero { background: linear-gradient(135deg, #431407 0%, #9a3412 58%, #ea580c 100%); }
.doc-v2 .cg-hero-main { min-width: 0; }
.doc-v2-kicker {
  margin-bottom: 9px;
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
}
.doc-v2 .cg-supplier {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .01em;
}
.doc-v2 .cg-meta {
  margin-top: 9px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  line-height: 1.7;
}
.doc-v2 .cg-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 54%;
}
.doc-v2 .cg-actions .btn {
  min-height: 32px;
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  box-shadow: none;
}
.doc-v2 .cg-actions .btn:hover { background: rgba(255, 255, 255, .2); }
.doc-v2 .cg-actions .btn-danger { border-color: #ef4444; background: #dc2626; }
.doc-v2 .cg-actions .btn-ok { border-color: #86efac; background: #16a34a; }
.doc-v2 .cg-actions .btn-warn { border-color: #fdba74; background: #ea580c; }
.doc-v2 .cg-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: -32px 22px 0;
}
.doc-v2 .cg-metric {
  padding: 15px 17px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}
.doc-v2 .cg-metric span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
}
.doc-v2 .cg-metric strong {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.doc-v2 .cg-metric.cg-amount { border-color: #fed7aa; background: #fff7ed; }
.doc-v2 .cg-metric.cg-amount strong { color: #c2410c; }
.doc-v2 .cg-metric.cg-status strong { color: #1d4ed8; }
.doc-v2 .cg-metric.cg-tax strong,
.doc-v2 .cg-metric.cg-settle strong { color: #0f766e; }
.doc-v2 .cg-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 24px 26px 8px;
}
.doc-v2 .cg-info .form-item { min-width: 0; }
.doc-v2 .cg-info .form-item label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.doc-v2 .cg-info input,
.doc-v2 .cg-info .readonly {
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 13px;
}
.doc-v2 .cg-section-title {
  margin: 22px 26px 12px;
  padding: 0 0 9px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .03em;
}
.doc-v2 .cg-section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 15px;
  margin-right: 8px;
  border-radius: 3px;
  background: #2563eb;
  vertical-align: -2px;
}
.doc-v2-purchase .cg-section-title::before { background: #16a34a; }
.doc-v2-in .cg-section-title::before { background: #ea580c; }
.doc-v2 .table-wrap {
  margin: 0 26px 22px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: auto;
  background: #fff;
}
.doc-v2 .data { margin: 0; }
.doc-v2 .data th {
  padding: 11px 10px;
  border: 0;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.doc-v2 .data td {
  padding: 11px 10px;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
  font-size: 13px;
}
.doc-v2 .data tbody tr:nth-child(even) td { background: #f8fafc; }
.doc-v2 .data tbody tr:hover td { background: #eff6ff; }
.doc-v2 .data tfoot th { background: #e2e8f0; color: #0f172a; }
.doc-v2 .data td.amount-cell, .doc-v2 .data td.ck-amount {
  color: #c2410c;
  font-weight: 800;
}
.doc-v2 .cg-summary {
  display: flex;
  gap: 8px;
  margin: 0 26px 18px;
  padding: 13px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  line-height: 1.7;
}
.doc-v2 .cg-summary-icon { color: #2563eb; }
.doc-v2 .cg-extra-links {
  margin: 0 26px 16px;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  color: #475569;
}
.doc-v2 .view-voucher,
.doc-v2 .cg-voucher-extra {
  margin: 0 26px 18px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.doc-v2 .cg-pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 26px 18px;
  padding: 14px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
.doc-v2 .sealed-banner { border-radius: 0; }
@media (max-width: 900px) {
  .doc-v2 .cg-hero { flex-direction: column; padding: 22px 20px 44px; }
  .doc-v2 .cg-actions { justify-content: flex-start; max-width: none; }
  .doc-v2 .cg-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: -30px 14px 0; }
  .doc-v2 .cg-info { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 18px 6px; }
  .doc-v2 .cg-section-title { margin-left: 18px; margin-right: 18px; }
  .doc-v2 .table-wrap,
  .doc-v2 .cg-summary,
  .doc-v2 .cg-extra-links,
  .doc-v2 .view-voucher,
  .doc-v2 .cg-voucher-extra,
  .doc-v2 .cg-pay-actions { margin-left: 18px; margin-right: 18px; }
}
@media (max-width: 560px) {
  .doc-v2 .cg-metrics,
  .doc-v2 .cg-info { grid-template-columns: 1fr; }
  .doc-v2 .cg-supplier { font-size: 22px; }
}
/* ===== 单据详情 V3：纸张档案风格 ===== */
.doc-v3 {
  --doc-accent: #1d4ed8;
  --doc-soft: #eff6ff;
  --doc-line: #ddd6c8;
  padding: 0;
  border: 1px solid var(--doc-line);
  border-radius: 8px;
  overflow: hidden;
  background: #f7f4ed;
  box-shadow: 0 18px 45px rgba(61, 52, 38, .12);
}
.doc-v3-purchase { --doc-accent: #15803d; --doc-soft: #f0fdf4; }
.doc-v3-in { --doc-accent: #c2410c; --doc-soft: #fff7ed; }
.doc-v3 .cg-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 30px 34px 24px;
  border: 0;
  border-top: 4px solid var(--doc-accent);
  border-bottom: 1px solid var(--doc-line);
  background: #fffdf8;
  color: #2f2a22;
}
.doc-v3 .cg-hero::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: 18px;
  width: 56px;
  height: 3px;
  background: var(--doc-accent);
  opacity: .35;
}
.doc-v3 .cg-hero-main { min-width: 0; }
.doc-v3 .doc-v2-kicker {
  margin-bottom: 10px;
  color: var(--doc-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
}
.doc-v3 .cg-supplier {
  color: #27231c;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .02em;
}
.doc-v3 .cg-meta {
  margin-top: 9px;
  color: #7c7466;
  font-size: 13px;
  line-height: 1.8;
}
.doc-v3 .cg-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 55%;
}
.doc-v3 .cg-actions .btn {
  border-color: #d6cfc0;
  background: #fff;
  color: #4b4438;
  box-shadow: none;
}
.doc-v3 .cg-actions .btn:hover { border-color: var(--doc-accent); color: var(--doc-accent); }
.doc-v3 .cg-actions .btn-ok { border-color: #86efac; background: #f0fdf4; color: #166534; }
.doc-v3 .cg-actions .btn-danger { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.doc-v3 .cg-actions .btn-warn { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.doc-v3 .cg-metrics {
  position: static;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--doc-line);
  background: #fbf8f1;
}
.doc-v3 .cg-metric {
  padding: 18px 24px;
  border: 0;
  border-right: 1px solid var(--doc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.doc-v3 .cg-metric:last-child { border-right: 0; }
.doc-v3 .cg-metric span {
  display: block;
  margin-bottom: 7px;
  color: #8b8274;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.doc-v3 .cg-metric strong {
  display: block;
  color: #2f2a22;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.doc-v3 .cg-metric.cg-amount { background: var(--doc-soft); }
.doc-v3 .cg-metric.cg-amount strong { color: var(--doc-accent); }
.doc-v3 .cg-metric.cg-status strong { color: #1e3a8a; }
.doc-v3 .cg-metric.cg-tax strong,
.doc-v3 .cg-metric.cg-settle strong { color: #0f766e; }
.doc-v3 .cg-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 22px;
  margin: 0;
  padding: 24px 34px 10px;
}
.doc-v3 .cg-info .form-item { min-width: 0; }
.doc-v3 .cg-info .form-item label {
  display: block;
  margin-bottom: 4px;
  color: #8b8274;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.doc-v3 .cg-info input,
.doc-v3 .cg-info .readonly {
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid #d8d2c4;
  border-radius: 0;
  background: transparent;
  color: #3f382d;
  font-size: 13px;
}
.doc-v3 .cg-section-title {
  margin: 26px 34px 10px;
  padding: 0;
  border: 0;
  color: #5c5447;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.doc-v3 .cg-section-title::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border: 2px solid var(--doc-accent);
  vertical-align: 1px;
}
.doc-v3 .table-wrap {
  margin: 0 34px 22px;
  border: 1px solid var(--doc-line);
  border-radius: 3px;
  overflow: auto;
  background: #fffdf8;
}
.doc-v3 .data { margin: 0; }
.doc-v3 .data th {
  padding: 10px 11px;
  border: 0;
  border-bottom: 2px solid var(--doc-accent);
  background: #f1ece1;
  color: #5c5447;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  white-space: nowrap;
}
.doc-v3 .data td {
  padding: 10px 11px;
  border-bottom: 1px solid #ece6da;
  color: #3f382d;
  font-size: 13px;
}
.doc-v3 .data tbody tr:nth-child(even) td { background: #faf7f0; }
.doc-v3 .data tbody tr:hover td { background: var(--doc-soft); }
.doc-v3 .data tfoot th { background: #f1ece1; color: #2f2a22; }
.doc-v3 .data td.amount-cell,
.doc-v3 .data td.ck-amount { color: var(--doc-accent); font-weight: 800; }
.doc-v3-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 34px 18px;
  padding: 14px 16px;
  border: 1px solid var(--doc-line);
  border-left: 3px solid var(--doc-accent);
  background: var(--doc-soft);
}
.doc-v3-summary > div { min-width: 0; }
.doc-v3-summary-label {
  margin-bottom: 4px;
  color: #8b8274;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.doc-v3-summary-text { color: #3f382d; font-size: 13px; line-height: 1.65; }
.doc-v3 .cg-summary {
  margin: 0 34px 18px;
  padding: 14px 16px;
  border: 1px solid var(--doc-line);
  border-left: 3px solid var(--doc-accent);
  border-radius: 0;
  background: var(--doc-soft);
  color: #3f382d;
}
.doc-v3 .cg-extra-links {
  margin: 0 34px 16px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px dashed var(--doc-line);
  background: transparent;
  color: #6b6355;
}
.doc-v3 .view-voucher,
.doc-v3 .cg-voucher-extra {
  margin: 0 34px 18px;
  padding: 12px;
  border: 1px solid var(--doc-line);
  border-radius: 3px;
  background: #fffdf8;
}
.doc-v3 .cg-pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 34px 18px;
  padding: 14px 16px;
  border: 1px dashed #cfc7b7;
  border-radius: 3px;
  background: #fbf8f1;
}
.doc-v3 .sealed-banner { border-radius: 0; }
@media (max-width: 900px) {
  .doc-v3 .cg-hero { flex-direction: column; padding: 24px 20px 20px; }
  .doc-v3 .cg-actions { justify-content: flex-start; max-width: none; }
  .doc-v3 .cg-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-v3 .cg-metric { border-bottom: 1px solid var(--doc-line); }
  .doc-v3 .cg-info { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 20px 8px; }
  .doc-v3 .cg-section-title { margin-left: 20px; margin-right: 20px; }
  .doc-v3 .table-wrap,
  .doc-v3-summary,
  .doc-v3 .cg-summary,
  .doc-v3 .cg-extra-links,
  .doc-v3 .view-voucher,
  .doc-v3 .cg-voucher-extra,
  .doc-v3 .cg-pay-actions { margin-left: 20px; margin-right: 20px; }
}
@media (max-width: 560px) {
  .doc-v3 .cg-metrics,
  .doc-v3 .cg-info { grid-template-columns: 1fr; }
  .doc-v3 .cg-supplier { font-size: 23px; }
  .doc-v3-summary { flex-direction: column; align-items: flex-start; }
}
/* ===== 单据详情 V4：简洁商务风 ===== */
.doc-v4 {
  --doc-accent: #2563eb;
  --doc-accent-deep: #1d4ed8;
  --doc-soft: #eff6ff;
  --doc-ink: #1e293b;
  --doc-muted: #64748b;
  --doc-line: #e2e8f0;
  padding: 0;
  border: 1px solid var(--doc-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 32px rgba(15, 23, 42, .07);
}
.doc-v4-purchase { --doc-accent: #059669; --doc-accent-deep: #047857; --doc-soft: #ecfdf5; }
.doc-v4-in { --doc-accent: #d97706; --doc-accent-deep: #b45309; --doc-soft: #fffbeb; }
.doc-v4 .cg-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 32px 22px;
  border: 0;
  border-top: 3px solid var(--doc-accent);
  border-bottom: 1px solid var(--doc-line);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: var(--doc-ink);
}
.doc-v4 .cg-hero-main { min-width: 0; }
.doc-v4 .doc-v2-kicker {
  margin-bottom: 8px;
  color: var(--doc-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}
.doc-v4 .cg-supplier {
  color: var(--doc-ink);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .01em;
}
.doc-v4 .cg-meta {
  margin-top: 8px;
  color: var(--doc-muted);
  font-size: 12px;
  line-height: 1.8;
}
.doc-v4 .cg-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 56%;
}
.doc-v4 .cg-actions .btn {
  min-height: 32px;
  border-color: #dbe3ee;
  background: #fff;
  color: #334155;
  box-shadow: none;
}
.doc-v4 .cg-actions .btn:hover { border-color: var(--doc-accent); color: var(--doc-accent); background: var(--doc-soft); }
.doc-v4 .cg-actions .btn-ok { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.doc-v4 .cg-actions .btn-danger { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.doc-v4 .cg-actions .btn-warn { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.doc-v4 .cg-metrics {
  position: static;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 18px 24px;
  border-bottom: 1px solid var(--doc-line);
  background: #f8fafc;
}
.doc-v4 .cg-metric {
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}
.doc-v4 .cg-metric span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}
.doc-v4 .cg-metric strong {
  display: block;
  color: #0f172a;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.doc-v4 .cg-metric.cg-amount { border-color: #bfdbfe; background: var(--doc-soft); }
.doc-v4 .cg-metric.cg-amount strong { color: var(--doc-accent-deep); }
.doc-v4 .cg-metric.cg-status strong { color: #1e40af; }
.doc-v4 .cg-metric.cg-tax strong,
.doc-v4 .cg-metric.cg-settle strong { color: #0f766e; }
.doc-v4 .cg-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 20px;
  margin: 0;
  padding: 22px 30px 8px;
}
.doc-v4 .cg-info .form-item { min-width: 0; }
.doc-v4 .cg-info .form-item label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
.doc-v4 .cg-info input,
.doc-v4 .cg-info .readonly {
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
}
.doc-v4 .cg-section-title {
  margin: 22px 30px 10px;
  padding: 0;
  border: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
}
.doc-v4 .cg-section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 14px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--doc-accent);
  vertical-align: -2px;
}
.doc-v4 .table-wrap {
  margin: 0 30px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  overflow: auto;
  background: #fff;
}
.doc-v4 .data { margin: 0; }
.doc-v4 .data th {
  padding: 10px 11px;
  border: 0;
  border-bottom: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.doc-v4 .data td {
  padding: 10px 11px;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
  font-size: 13px;
}
.doc-v4 .data tbody tr:nth-child(even) td { background: #f8fafc; }
.doc-v4 .data tbody tr:hover td { background: var(--doc-soft); }
.doc-v4 .data tfoot th { background: #eef2f7; color: #0f172a; }
.doc-v4 .data td.amount-cell,
.doc-v4 .data td.ck-amount { color: var(--doc-accent-deep); font-weight: 800; }
.doc-v4-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 30px 18px;
  padding: 13px 15px;
  border: 1px solid #dbeafe;
  border-radius: 9px;
  background: var(--doc-soft);
}
.doc-v4-summary > div { min-width: 0; }
.doc-v4-summary-label {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.doc-v4-summary-text { color: #334155; font-size: 13px; line-height: 1.6; }
.doc-v4 .cg-summary {
  margin: 0 30px 18px;
  padding: 13px 15px;
  border: 1px solid #dbeafe;
  border-radius: 9px;
  background: var(--doc-soft);
  color: #334155;
}
.doc-v4 .cg-extra-links {
  margin: 0 30px 16px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
}
.doc-v4 .view-voucher,
.doc-v4 .cg-voucher-extra {
  margin: 0 30px 18px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
}
.doc-v4 .cg-pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 30px 18px;
  padding: 13px 15px;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
}
.doc-v4 .sealed-banner { border-radius: 0; }
@media (max-width: 900px) {
  .doc-v4 .cg-hero { flex-direction: column; padding: 22px 20px 18px; }
  .doc-v4 .cg-actions { justify-content: flex-start; max-width: none; }
  .doc-v4 .cg-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; }
  .doc-v4 .cg-info { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 20px 8px; }
  .doc-v4 .cg-section-title { margin-left: 20px; margin-right: 20px; }
  .doc-v4 .table-wrap,
  .doc-v4-summary,
  .doc-v4 .cg-summary,
  .doc-v4 .cg-extra-links,
  .doc-v4 .view-voucher,
  .doc-v4 .cg-voucher-extra,
  .doc-v4 .cg-pay-actions { margin-left: 20px; margin-right: 20px; }
}
@media (max-width: 560px) {
  .doc-v4 .cg-metrics,
  .doc-v4 .cg-info { grid-template-columns: 1fr; }
  .doc-v4 .cg-supplier { font-size: 22px; }
  .doc-v4-summary { flex-direction: column; align-items: flex-start; }
}
.doc-v4-linkline { margin:14px 30px 0; padding:9px 12px; border:1px solid #e2e8f0; border-radius:8px; background:#f8fafc; color:#475569; font-size:13px; }
.doc-v4-qty-total { float:right; color:#2563eb; font-size:12px; font-weight:800; letter-spacing:0; }
@media (max-width:900px){ .doc-v4-linkline { margin-left:20px; margin-right:20px; } }
.doc-v4-summary-line { display:flex; align-items:center; gap:8px; margin:0 30px 18px; padding:10px 14px; border:1px solid #e2e8f0; border-radius:8px; background:#f8fafc; color:#475569; font-size:13px; line-height:1.5; cursor:pointer; overflow:hidden; }
.doc-v4-summary-line:hover { border-color:#bfdbfe; background:#eff6ff; }
.doc-v4-summary-icon { flex:0 0 auto; font-size:15px; }
.doc-v4-summary-line .doc-v4-summary-label { flex:0 0 auto; font-size:12px; font-weight:700; color:#64748b; }
.doc-v4-summary-line-text { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#334155; }
@media (max-width:900px){ .doc-v4-summary-line { margin-left:20px; margin-right:20px; } }
.doc-v4-summary-line-text { flex:1 1 auto; }
.doc-v4-summary-total { flex:0 0 auto; margin-left:10px; padding-left:12px; border-left:1px solid #dbe3ee; color:#2563eb; font-size:12px; font-weight:800; white-space:nowrap; }
.doc-v4-summary-line { margin:0 30px 12px; padding:0; border:0; border-radius:0; background:transparent; }
.doc-v4-summary-line:hover { border:0; background:transparent; }
.doc-v4-summary-line:hover .doc-v4-summary-line-text { color:#1d4ed8; }
@media (max-width:900px){ .doc-v4-summary-line { margin-left:20px; margin-right:20px; } }
.doc-v4-section-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.doc-v4-section-row .doc-v4-qty-total { float:none; margin-left:auto; }
.doc-v4-summary-inline { min-width:0; max-width:46%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#64748b; font-size:12px; font-weight:500; letter-spacing:0; cursor:pointer; }
.doc-v4-summary-inline:hover { color:#1d4ed8; }
@media (max-width:700px){ .doc-v4-summary-inline { max-width:100%; width:100%; } }
.doc-v4-summary-inline { color:#2563eb; font-size:12px; font-weight:800; letter-spacing:0; }
.doc-v4-summary-inline:hover { color:#1d4ed8; }
.doc-v4-out .cg-hero { padding:20px 26px 16px; gap:16px; }
.doc-v4-out .cg-supplier { font-size:23px; }
.doc-v4-out .cg-meta { margin-top:5px; font-size:12px; }
.doc-v4-out .cg-actions { gap:6px; }
.doc-v4-out .cg-actions .btn { min-height:30px; padding:5px 9px; font-size:12px; }
.doc-v4-out .cg-metrics { gap:8px; padding:12px 20px; }
.doc-v4-out .cg-metric { padding:10px 13px; border-radius:8px; }
.doc-v4-out .cg-metric span { margin-bottom:3px; font-size:9px; }
.doc-v4-out .cg-metric strong { font-size:17px; }
.doc-v4-out .cg-metric.cg-amount strong { font-size:19px; }
.doc-v4-out .cg-section-title { margin-top:16px; }
.doc-v4-out .table-wrap { margin-bottom:16px; }
.doc-v4-out .data th { padding:8px 10px; border-bottom-color:#93c5fd; background:#eff6ff; color:#1e3a8a; font-size:11px; }
.doc-v4-out .data td { padding:8px 10px; color:#1d4ed8; font-size:13px; }
.doc-v4-out .data td.amount-cell, .doc-v4-out .data td.ck-amount { color:#1d4ed8; font-size:13px; }
.doc-v4-out .data th { padding:10px 11px; border-bottom:1px solid #cbd5e1; background:#f1f5f9; color:#475569; font-size:11px; }
.doc-v4-out .data td { padding:10px 11px; color:#334155; font-size:13px; }
.doc-v4-out .data td.amount-cell, .doc-v4-out .data td.ck-amount { color:var(--doc-accent-deep); font-size:13px; }
.doc-v4-out.ck-theme-complete { --doc-accent:#059669; --doc-accent-deep:#047857; --doc-soft:#ecfdf5; }
.doc-v4-out.ck-theme-pending { --doc-accent:#d97706; --doc-accent-deep:#b45309; --doc-soft:#fffbeb; }
.doc-v4-out.ck-theme-active { --doc-accent:#2563eb; --doc-accent-deep:#1d4ed8; --doc-soft:#eff6ff; }
.doc-v4-out.ck-theme-complete .cg-hero { background:linear-gradient(180deg,#f0fdf4 0%,#f8fafc 100%); }
.doc-v4-out.ck-theme-pending .cg-hero { background:linear-gradient(180deg,#fffbeb 0%,#f8fafc 100%); }
.doc-v4-out .cg-metric.ck-state-ok { border-color:#a7f3d0; background:#f0fdf4; }
.doc-v4-out .cg-metric.ck-state-ok strong { color:#047857; }
.doc-v4-out .cg-metric.ck-state-warn { border-color:#fde68a; background:#fffbeb; }
.doc-v4-out .cg-metric.ck-state-warn strong { color:#b45309; }
.doc-v4-out .cg-metric.ck-state-info { border-color:#bfdbfe; background:#eff6ff; }
.doc-v4-out .cg-metric.ck-state-info strong { color:#1d4ed8; }
.doc-v4-out .cg-metric.ck-state-muted { border-color:#e2e8f0; background:#f8fafc; }
.doc-v4-out .cg-metric.ck-state-muted strong { color:#64748b; }
.doc-v4-out .data th { border-bottom:1px solid #93c5fd; background:#e8f1ff; color:#1e3a8a; }
.doc-v4-out .data td, .doc-v4-out .data td.amount-cell, .doc-v4-out .data td.ck-amount { color:#1d4ed8; }
.doc-v4-out .data td.amount-cell, .doc-v4-out .data td.ck-amount { font-weight:800; }
.doc-v4-out.ck-theme-pending { --doc-accent:#4f46e5; --doc-accent-deep:#4338ca; --doc-soft:#eef2ff; }
.doc-v4-out.ck-theme-pending .cg-hero { background:linear-gradient(180deg,#eef2ff 0%,#f8fafc 100%); }
.doc-v4-out .cg-actions .btn-warn { border-color:#fecdd3; background:#fff1f2; color:#be123c; }
.doc-v4-out .cg-metric.ck-state-warn { border-color:#fecdd3; background:#fff1f2; }
.doc-v4-out .cg-metric.ck-state-warn strong { color:#be123c; }
.doc-v4-out .data th { font-size:12px; }
.doc-v4-out .data td { font-size:14px; }
.doc-v4-out .data td.amount-cell, .doc-v4-out .data td.ck-amount { font-size:14px; }
.doc-v4-out .data tfoot th { font-size:15px; font-weight:800; }
.doc-v4-out .ck-metric-sub { display:block; margin-top:5px; color:#64748b; font-size:10px; font-weight:500; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.doc-v4-out .ck-metric-sub a { color:#1d4ed8; text-decoration:none; border-bottom:1px dashed #93c5fd; }
.data tbody tr.doc-row-active td { background:#dbeafe !important; border-top:1px solid #93c5fd; border-bottom:1px solid #93c5fd; }
.data tbody tr.doc-row-active td:first-child { box-shadow:inset 3px 0 0 #2563eb; }
.data td.ck-paid-amount { color:#059669 !important; font-weight:800; }
.outbound-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
.outbound-stats .stat { padding:16px 17px; background:#fff; border-color:#e2e8f0; }
.outbound-stats .stat .k { font-size:12px; font-weight:700; color:#475569; }
.outbound-stats .stat .v { margin-top:7px; font-variant-numeric:tabular-nums; }
.outbound-stats .stat-desc { margin-top:9px; padding-top:8px; border-top:1px dashed #e2e8f0; color:#64748b; font-size:11px; line-height:1.55; }
@media (max-width:1100px){ .outbound-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px){ .outbound-stats { grid-template-columns:1fr; } }
.outbound-stats .stat { border-top:3px solid #dbe3ee; }
.outbound-stats .stat .v.warn { color:#dc2626; }
.outbound-stats .stat .v.invoice { color:#ca8a04; }
.outbound-stats .stat-desc { border-top:1px solid #e2e8f0; }
.contract-detail-table th, .contract-detail-table td, .contract-detail-table tfoot th { color:#1d4ed8; }
.contract-detail-table thead th { background:#eff6ff; border-bottom-color:#93c5fd; }
.contract-hint { color:#dc2626; }
.fy-cat, .fy-pay { display:inline-block; padding:2px 7px; border-radius:999px; font-size:11px; font-weight:700; white-space:nowrap; }
.fy-cat-material { background:#ecfdf5; color:#047857; }
.fy-cat-travel { background:#eff6ff; color:#1d4ed8; }
.fy-cat-office { background:#f5f3ff; color:#6d28d9; }
.fy-cat-repair { background:#fff7ed; color:#c2410c; }
.fy-cat-other { background:#f1f5f9; color:#475569; }
.fy-pay-bank { background:#e0f2fe; color:#0369a1; }
.fy-pay-wechat { background:#ecfdf5; color:#047857; }
.fy-pay-alipay { background:#eff6ff; color:#1d4ed8; }
.fy-pay-cash { background:#fef3c7; color:#92400e; }
.fy-pay-public { background:#f5f3ff; color:#6d28d9; }
.fy-filter { width:120px !important; }
.fy-cat-salary { background:#fef2f2; color:#b91c1c; }
.fy-cat-rent { background:#fdf2f8; color:#be185d; }
.fy-cat-utility { background:#fffbeb; color:#b45309; }
.fy-cat-meal { background:#f0fdf4; color:#15803d; }
.fy-cat-finance { background:#ecfeff; color:#0e7490; }
.fy-cat-fuel { background:#fefce8; color:#a16207; }
.fy-cat-manage { background:#eef2ff; color:#4338ca; }
.fy-detail { --fy-accent:#2563eb; border:1px solid #e2e8f0; border-radius:12px; overflow:hidden; background:#fff; }
.fy-detail-settled { --fy-accent:#059669; }
.fy-detail-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:18px 22px; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.fy-detail-kicker { color:var(--fy-accent); font-size:10px; font-weight:800; letter-spacing:.14em; }
.fy-detail-title h2 { margin:5px 0 0; color:#0f172a; font-size:23px; font-weight:800; letter-spacing:.02em; }
.fy-detail-sub { margin-top:4px; color:#64748b; font-size:12px; }
.fy-detail-side { text-align:right; flex:0 0 auto; }
.fy-detail-amount { color:var(--fy-accent); font-size:28px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1.1; }
.fy-detail-status { margin-top:5px; }
.fy-detail-actions { display:flex; gap:6px; justify-content:flex-end; margin-top:9px; }
.fy-detail-body { padding:16px 22px 20px; }
.fy-detail-section-title { display:flex; align-items:center; gap:8px; margin:14px 0 8px; color:#475569; font-size:12px; font-weight:800; letter-spacing:.04em; }
.fy-detail-section-title:first-child { margin-top:0; }
.fy-detail-section-title::before { content:""; width:4px; height:13px; border-radius:2px; background:var(--fy-accent); }
.fy-info-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; border:1px solid #e2e8f0; border-radius:8px; overflow:hidden; background:#e2e8f0; }
.fy-info-item { min-width:0; padding:10px 12px; background:#fff; }
.fy-info-item span { display:block; margin-bottom:4px; color:#94a3b8; font-size:10px; font-weight:700; }
.fy-info-item b { display:block; overflow:hidden; color:#334155; font-size:13px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.fy-info-wide { grid-column:span 2; }
.fy-file-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.fy-file-card { border:1px solid #e2e8f0; border-radius:8px; overflow:hidden; }
.fy-file-head { display:flex; justify-content:space-between; padding:8px 11px; background:#f8fafc; color:#475569; font-size:12px; font-weight:700; }
.fy-file-head small { color:#94a3b8; font-weight:600; }
.fy-file-list { display:flex; flex-direction:column; gap:5px; padding:9px 11px; font-size:12px; }
.fy-file-list a { color:var(--fy-accent); text-decoration:none; }
.fy-file-list a:hover { text-decoration:underline; }
.fy-file-empty { color:#94a3b8; }
@media (max-width:760px) {
  .fy-detail-head { flex-direction:column; }
  .fy-detail-side { width:100%; text-align:left; }
  .fy-detail-actions { justify-content:flex-start; }
  .fy-info-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .fy-info-wide { grid-column:1/-1; }
  .fy-file-grid { grid-template-columns:1fr; }
}

/* 字体渲染：优先使用 Windows/macOS 系统 UI 字体，零网络下载，清晰且加载最快 */
html {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
}
/* 正文 400；标题/强调 600，避免细体和高分屏合成模糊 */
body, body p, body div, body span, body td, body li, body a,
body label, body input, body select, body textarea, body button {
  font-weight: 400 !important;
}
body h1, body h2, body h3, body h4, body h5, body h6,
body .card-title h3, body .wb-card-head h2, body .cg-supplier,
body .fy-detail-title h2, body th, body .data th,
body b, body strong, body .stat .v, body .cg-metric strong,
body .fy-detail-amount, body .wb-kpi strong, body .modal-title,
body .cg-section-title, body .fy-file-head, body .fy-detail-section-title {
  font-weight: 600 !important;
}
/* 常用正文适当放大，小字保持可读 */
body .data td { font-size: 14px; }
body .data th { font-size: 13px; }
body .form-item label { font-size: 13px; }
body .form-item input, body .form-item select, body .form-item textarea { font-size: 15px; }
body .card-title h3 { font-size: 17px; }
body small, body .brand-txt small, body .menu-group, body .supplier-company,
body .ck-metric-sub, body .wb-todo-text small, body .wb-recent-row small,
body .wb-quick-grid small, body .wb-card-head p, body .wb-kpi-foot { font-size: 12px; }
body .doc-v4-out .cg-metric span { font-size: 12px; }

body .selected-customer-label, body .stock-pick-meta, body .stock-pick-spec, body .stock-pick-qty, body .supplier-company, body .caigou-qty-units, body .cg-metric span, body .wb-badge, body .wb-recent-title, body .wb-hero-kicker { font-size: 12px !important; }
body .wb-axis-text { font-size: 11px; }

@media print {
  @page { size: A4; margin: 10mm; }
  body { background:#fff !important; }
  .sidebar, .topbar, .toolbar, .pager-wrap, .btn { display:none !important; }
  .layout { display:block !important; }
  .content { padding:0 !important; background:#fff !important; }
  .card { box-shadow:none !important; border:1px solid #d1d5db !important; break-inside:avoid; margin-bottom:10px; }
  .stats { break-inside:avoid; }
  .table-wrap { overflow:visible !important; }
  .data th, .data td { font-size:11px !important; padding:5px 6px !important; }
}

/* 报表中心：紧凑、无黑色横线、统一说明 */
.report-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.report-stats .stat { padding: 10px 12px; border: 0; border-left: 3px solid #bfdbfe; border-radius: 6px; background: #f8fafc; box-shadow: none; }
.report-stats .stat .k { color: #64748b; font-size: 12px; line-height: 1.4; }
.report-stats .stat .v { margin-top: 4px; color: #0f172a; font-size: 18px; line-height: 1.25; }
.report-stats .stat .v.brand { color: #1d4ed8; }
.report-stats .stat .v.ok { color: #047857; }
.report-stats .stat .v.warn { color: #b45309; }
.report-scope { margin: 0 0 10px; padding: 8px 11px; border: 1px solid #e2e8f0; border-left: 3px solid #2563eb; border-radius: 5px; background: #f8fafc; color: #475569; font-size: 12px; line-height: 1.6; }
.report-scope b { color: #1e3a8a; font-weight: 600; }
@media print { .report-stats { gap: 6px; } .report-stats .stat { border-left: 2px solid #93c5fd; background: #fff; } .report-scope { background: #fff; } }

/* 出库统计去掉横线，卡片底部对齐 */
.outbound-stats { align-items: stretch; }
.outbound-stats .stat { display: flex; flex-direction: column; border-top: 0; }
.outbound-stats .stat-desc { margin-top: auto; padding-top: 0; border-top: 0; }

/* 兜底清除出库统计卡片底部分割线来源 */
.outbound-stats .stat::before, .outbound-stats .stat::after,
.outbound-stats .stat-desc::before, .outbound-stats .stat-desc::after { display:none !important; content:none !important; }
.outbound-stats .stat-desc { border-top:0 !important; border-bottom:0 !important; padding-top:0 !important; box-shadow:none !important; }
.outbound-stats .stat .v { border:0 !important; box-shadow:none !important; text-decoration:none !important; }
.outbound-stats hr { display:none !important; }

/* 个人资料 */
.profile-head { display:flex; align-items:center; gap:16px; padding:14px; margin-bottom:16px; border:1px solid #e2e8f0; border-radius:10px; background:#f8fafc; }
.profile-avatar-box { flex:0 0 auto; }
.profile-avatar { width:76px; height:76px; border-radius:50%; object-fit:cover; border:3px solid #fff; box-shadow:0 2px 8px rgba(15,23,42,.12); }
.profile-avatar-letter { display:inline-flex; align-items:center; justify-content:center; background:#dbeafe; color:#1d4ed8; font-size:28px; font-weight:600; }
.profile-head-info { display:flex; flex-direction:column; gap:3px; min-width:0; }
.profile-head-info strong { color:#0f172a; font-size:16px; }
.profile-head-info span { color:#475569; font-size:13px; }
.profile-head-info small { color:#94a3b8; font-size:12px; line-height:1.5; }

/* 核对账单税别颜色 */
.tax-tag { display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:600; line-height:1.5; white-space:nowrap; }
.hd-tax-hanshui { background:#fff7ed; color:#c2410c; }
.hd-tax-nohanshui { background:#ecfdf5; color:#047857; }
.hd-tax-invoiced { background:#eff6ff; color:#1d4ed8; }
.hd-tax-other { background:#f1f5f9; color:#64748b; }

/* 代加工入库单详情明细：蓝色大字号 */
.ruku-detail-table th { color:#1e40af; font-size:14px; }
.ruku-detail-table td { color:#1d4ed8; font-size:15px; }
.ruku-detail-table td.actions .btn { font-size:13px; }

.cg-doc-link { color:#1d4ed8; font-weight:600; text-decoration:none; }
.cg-doc-link:hover { text-decoration:underline; }

/* 公司信息与打印模板设置 */
.pc-required { color:#dc2626; font-weight:700; }
.print-preview { margin:8px 0 14px; padding:8mm; background:#fff; color:#000; border:1px solid #000; font-family:"Noto Sans SC","Microsoft YaHei",sans-serif; max-width:210mm; }
.print-preview .pp-head { display:flex; justify-content:space-between; gap:10px; border-bottom:2px solid #000; padding-bottom:4px; font-size:12px; }
.print-preview .pp-head strong { font-size:16px; }
.print-preview h4 { text-align:center; margin:8px 0; font-size:18px; }
.print-preview .pp-meta { display:flex; justify-content:space-between; font-size:11px; margin-bottom:6px; }
.print-preview table { width:100%; border-collapse:collapse; table-layout:fixed; }
.print-preview th,.print-preview td { border:1px solid #000; padding:3px 4px; font-size:11px; color:#000; background:#fff; }
.print-preview th { font-weight:700; }
.print-preview .pp-foot { margin-top:8px; padding-top:5px; border-top:1px solid #000; font-size:11px; }

.print-preview .pp-custom { margin:6px 0; padding:5px 0; border-top:1px solid #000; border-bottom:1px solid #000; font-size:11px; line-height:1.45; white-space:pre-wrap; color:#000; }

.merge-cust-search { position:relative; flex:1; min-width:240px; }
.merge-cust-search input { width:100%; }
.merge-cust-search .ac-menu { min-width:280px; }

.fl-query-row { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }
.fl-query-row .form-item { margin:0; }
.fl-customer-box { position:relative; flex:0 0 300px; width:300px; max-width:300px; min-width:0; }
.fl-customer-box input { width:300px; max-width:100%; }
.fl-query-row input[type=date] { min-width:150px; }
.fl-amount-row { grid-template-columns:repeat(4,minmax(150px,1fr)) !important; }
.fl-save-row { display:flex; gap:12px; align-items:flex-end; margin-top:14px; }
.fl-save-row .form-item { flex:0 1 300px; max-width:300px; margin:0; }
.fl-save-row #flRemark { width:300px; max-width:100%; }
@media (max-width:800px){ .fl-amount-row { grid-template-columns:1fr 1fr !important; } .fl-save-row { flex-wrap:wrap; } .fl-save-row .form-item { flex:1 1 100%; } }

#flAvailable td { color:#1d4ed8; }
#flRows td { color:#9f1239; }
