:root { --primary: #2563EB; --sidebar: #1E293B; --page: #F8FAFC; --surface: #FFFFFF; --border: #E2E8F0; --text: #0F172A; --muted: #64748B; --radius: 5px; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Segoe UI", "Microsoft YaHei", sans-serif; background: var(--page); color: var(--text); }

/* 登录 */
.login-view { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2c3e50, #3498db); }
.login-box { background: #fff; padding: 40px; border-radius: 12px; width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-box h1 { font-size: 22px; margin-bottom: 4px; }
.login-box .sub { color: #7f8c8d; font-size: 13px; margin-bottom: 24px; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid #dcdde1; border-radius: 6px; font-size: 14px; }
.login-box button { width: 100%; padding: 12px; background: #2980b9; color: #fff; border: 0; border-radius: 6px; font-size: 15px; cursor: pointer; }
.login-box button:hover { background: #1f618d; }
.err { color: #e74c3c; font-size: 13px; margin-bottom: 10px; min-height: 18px; }

/* 应用布局 */
.app { display: flex; height: 100vh; }
.sidebar { width: 224px; background: var(--sidebar); color: #E2E8F0; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.06); }
.brand { padding: 18px 18px 16px; font-size: 15px; font-weight: 600; letter-spacing: .04em; border-bottom: 1px solid rgba(255,255,255,.08); }
#menu { flex: 1; padding: 8px 10px 12px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.35) transparent; }
#menu a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 12px 6px 38px; margin: 1px 0; border-radius: 6px; color: #94A3B8; text-decoration: none; font-size: 13.5px; line-height: 1.3; cursor: pointer; position: relative; }
#menu a:hover { background: rgba(255,255,255,.06); color: #F1F5F9; }
#menu a.active { background: rgba(37,99,235,.18); color: #FFFFFF; }
#menu a.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--primary); }
.menu-section { margin-top: 6px; }
.menu-group { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 8px 6px 12px; border: 0; border-radius: 6px; background: transparent; color: #CBD5E1; font: inherit; font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; user-select: none; }
.menu-group:hover { background: rgba(255,255,255,.06); color: #F8FAFC; }
.menu-group .icon { flex: none; color: #94A3B8; }
.menu-group:hover .icon { color: #F8FAFC; }
.menu-group-label { flex: 1; }
.menu-caret { flex: none; color: #64748B; transition: transform .15s ease; transform: rotate(90deg); }
.menu-section.collapsed .menu-caret { transform: rotate(0deg); }
#menu .menu-section.collapsed a { display: none; }
.icon { display: inline-block; vertical-align: -3px; flex: none; }
.page-title { display: flex; align-items: center; gap: 10px; }
.page-title .icon { width: 22px; height: 22px; color: var(--primary); }
.btn .icon { width: 15px; height: 15px; margin-right: 5px; vertical-align: -2.5px; }
.user-box { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; align-items: center; }
.user-box button { background: none; border: 1px solid #7f8c8d; color: #ecf0f1; padding: 4px 10px; border-radius: 4px; cursor: pointer; }
.content { flex: 1; overflow-y: auto; padding: 24px; background: var(--page); }

/* 通用组件 */
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; letter-spacing: .01em; }
.card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.06); margin-bottom: 16px; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar select, .toolbar input { padding: 8px 10px; border: 1px solid #dcdde1; border-radius: 6px; font-size: 14px; }
.btn { padding: 9px 18px; border: 0; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-primary { background: #2980b9; color: #fff; }
.btn-primary:hover { background: #1f618d; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #1e8449; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #ecf0f1; font-size: 14px; }
table.data th { background: #f8f9fa; font-weight: 600; color: #555; white-space: nowrap; }
table.data tr:hover td { background: #f0f7ff; }
.badge { padding: 3px 10px; border-radius: 12px; font-size: 12px; }
.badge-draft { background: #F1F5F9; color: #64748B; }
.badge-submitted { background: #FEF3C7; color: #D97706; }
.badge-in_progress, .badge-audited { background: #EFF6FF; color: #2563EB; }
.badge-completed, .badge-posted { background: #ECFDF5; color: #059669; }
.badge-voided, .badge-reversed, .badge-overdue { background: #FEF2F2; color: #DC2626; }

/* 驾驶舱 */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.kpi .label { color: #7f8c8d; font-size: 13px; margin-bottom: 6px; }
.kpi .value { font-size: 26px; font-weight: 700; color: #2c3e50; }
.kpi .value.red { color: #e74c3c; }

/* 录单 */
.form-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.form-row label { font-size: 13px; color: #555; display: flex; flex-direction: column; gap: 4px; }
.form-row select, .form-row input { padding: 8px 10px; border: 1px solid #dcdde1; border-radius: 6px; font-size: 14px; min-width: 160px; }
.summary-bar { display: flex; gap: 32px; justify-content: flex-end; font-size: 14px; padding: 12px 4px; }
.summary-bar b { font-size: 20px; color: #2980b9; }
.ag-theme-alpine { height: 360px; width: 100%; }

.hidden { display: none !important; }

/* 财务控制台与共享交互 */
button, input, select, textarea { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(41,128,185,.28); outline-offset: 2px; }
.content { min-width: 0; }
.finance-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: -2px 0 20px; border-bottom: 1px solid #dfe6e9; padding-bottom: 16px; }
.finance-header h1 { color: #203447; font-size: 24px; line-height: 1.2; }
.finance-header p:not(.eyebrow) { color: #687783; font-size: 13px; margin-top: 5px; }
.eyebrow { color: #2980b9; font-size: 12px; font-weight: 700; letter-spacing: .08em; margin-bottom: 4px; }
.page-actions, .actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h2, .card h2 { font-size: 16px; color: #2c3e50; }
.section-head p, .section-head span, .card small { color: #71808d; font-size: 12px; }
.btn { min-height: 44px; border: 1px solid #cfd8df; background: #fff; color: #334e63; font-weight: 600; }
.btn:not(.btn-primary):not(.btn-success):not(.btn-danger):hover { background: #eef4f7; }
.btn:disabled { cursor: not-allowed; opacity: .48; }
.btn-primary { border-color: #2980b9; background: #2980b9; color: #fff; }
.btn-success { border-color: #218c55; background: #218c55; color: #fff; }
.btn-danger { border-color: #c0392b; background: #c0392b; color: #fff; }
.btn-sm { min-height: 44px; padding: 5px 10px; }
.icon-btn { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: #526979; border-radius: 5px; cursor: pointer; font-size: 22px; }
.icon-btn:hover { background: #edf2f5; }
.link-button { border: 0; background: none; padding: 0; color: #1d6fa5; text-decoration: underline; cursor: pointer; font-weight: 600; }
.notice { padding: 11px 14px; margin-bottom: 16px; border-left: 4px solid #2980b9; background: #eaf4fb; color: #31536a; font-size: 13px; line-height: 1.55; }
.notice-warning { border-color: #d18b12; background: #fff7df; color: #6d5319; }
.text-danger { color: #c0392b; font-weight: 700; }
.finance-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 16px; }
.finance-kpis .kpi { border-top: 3px solid #2d6f91; border-radius: 4px; }
.finance-kpis .kpi small { display: block; margin-top: 7px; color: #82909a; }
.kpi .value.amber { color: #a2690b; font-size: 20px; }
.balance-row, .audit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; border-bottom: 1px solid #edf0f2; padding: 11px 0; }
.balance-row small, .audit-row small { display: block; }
.control-card dl > div { border-left: 2px solid #d8e3ea; margin: 14px 0; padding-left: 12px; }
.control-card dt { font-weight: 700; font-size: 13px; }
.control-card dd { color: #6b7984; font-size: 13px; margin-top: 3px; line-height: 1.5; }
.table-scroll { width: 100%; overflow-x: auto; margin-bottom: 16px; border: 1px solid #e0e5e8; background: #fff; }
.finance-table { border-radius: 0 !important; min-width: 850px; }
.finance-table th { position: sticky; top: 0; z-index: 1; background: #edf2f5 !important; color: #344c5d !important; font-size: 12px !important; letter-spacing: .02em; }
.finance-table td small { display: block; color: #7a8790; margin-top: 3px; }
.status { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border: 1px solid #cbd5db; border-radius: 3px; background: #eef2f4; color: #52616a; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-active, .status-approved, .status-posted, .status-closed, .status-completed, .status-ready, .status-verified, .status-confirmed, .status-accepted, .status-acknowledged, .status-succeeded, .status-matched { border-color: #8dc7aa; background: #e7f5ed; color: #17663c; }
.status-draft, .status-pending, .status-submitted, .status-soft_locked, .status-partial, .status-partially_accepted, .status-inflow, .status-outflow { border-color: #dfc480; background: #fff6db; color: #785b10; }
.status-failed, .status-rejected, .status-reversed, .status-disabled, .status-failed_final, .status-deleted { border-color: #dfa19b; background: #fcebea; color: #8d2e26; }
.status-terminated, .status-cancelled, .status-abandoned, .status-voided { border-color: #b9c4cc; background: #edf2f5; color: #4d5f6d; }
.row-inactive td { color: var(--muted, #71808d); }
/* direct-paid 五步结算 stepper（§14.11：不把授权压成一个“已审批”） */
.dp-steps { list-style: none; margin: 0 0 6px; padding: 0; counter-reset: dp-step; }
.dp-steps li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid #dce4e8; counter-increment: dp-step; }
.dp-steps li::before { content: counter(dp-step); font-weight: 700; color: var(--muted, #71808d); }
.dp-steps li.done::before { color: #17663c; }
.dp-steps li > div { display: flex; flex-direction: column; gap: 2px; }
.dp-steps li small { color: var(--muted, #71808d); word-break: break-all; }
@media (max-width: 600px) { .dp-steps li { grid-template-columns: 1fr; } .dp-steps li::before { display: none; } }
.state { min-height: 180px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px; color: #75838e; background: #fff; border: 1px dashed #ccd5db; padding: 24px; text-align: center; }
.state strong { color: #435766; }
.state-error { color: #a63c32; border-color: #dfaaa5; }
.spinner { width: 24px; height: 24px; border: 3px solid #dbe5eb; border-top-color: #2980b9; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 18px; }
.account-card { background: #fff; border: 1px solid #dfe5e8; border-top: 4px solid #365d72; padding: 17px; min-width: 0; box-shadow: 0 2px 7px rgba(31,54,69,.05); }
.account-card > div:first-child { display: flex; justify-content: space-between; }
.account-card h2 { font-size: 17px; margin: 13px 0 3px; }
.account-card p { color: #70808b; font-size: 13px; }
.account-card > strong { display: block; margin-top: 14px; font: 700 24px/1.1 "Segoe UI", sans-serif; color: #213f50; }
.account-card > small { color: #80909a; }
.account-empty { max-width: 720px; margin: 34px auto; border-top: 4px solid #365d72; }
.opening-milestone { display: grid; gap: 3px; margin: 14px 0; padding: 12px; border-left: 3px solid #2f7d62; background: #eef7f3; }
.opening-milestone span { color: #41675a; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.opening-milestone b { color: #174b3a; font-size: 18px; }
.opening-milestone small { color: #58766c; overflow-wrap: anywhere; }
.movement-root { margin-bottom: 14px; }
.account-kind { color: #5c7483; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.projection { margin: 15px 0; padding: 10px; background: repeating-linear-gradient(-45deg,#f8fafb,#f8fafb 8px,#f3f6f7 8px,#f3f6f7 16px); border: 1px solid #dce4e8; }
.projection > span { font-size: 11px; color: #6e7e88; }
.projection > b { float: right; font-size: 13px; }
.projection dl { clear: both; padding-top: 5px; }
.projection dl div { display: flex; justify-content: space-between; font-size: 11px; color: #71808a; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(19,34,44,.62); }
.dialog-backdrop[hidden] { display: none; }
.dialog { width: min(560px, 100%); max-height: calc(100vh - 36px); display: flex; flex-direction: column; background: #fff; border-top: 4px solid #2980b9; box-shadow: 0 22px 70px rgba(0,0,0,.32); }
.dialog-wide { width: min(940px, 100%); }
.dialog-drawer { position: fixed; inset: 0 0 0 auto; width: min(680px, 100%); max-height: 100vh; height: 100vh; border-top: 0; border-left: 4px solid #2980b9; }
.doc-detail-content .table-scroll { max-width: 100%; }
.dialog > header, .dialog > footer { flex: none; display: flex; align-items: center; padding: 14px 18px; }
.dialog > header { justify-content: space-between; border-bottom: 1px solid #e1e6e9; }
.dialog > header h2 { font-size: 18px; }
.dialog > footer { justify-content: flex-end; gap: 9px; border-top: 1px solid #e1e6e9; background: #f8fafb; }
.dialog-body { overflow: auto; padding: 18px; min-width: 0; }
.dialog-error { color: #b3382d; background: #fff0ee; min-height: 0; padding: 0 18px; font-size: 13px; }
.dialog-error:not(:empty) { padding-top: 10px; padding-bottom: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; color: #465c6b; font-size: 12px; font-weight: 700; min-width: 0; }
.form-grid label.payment-confirmation { flex-direction: row; align-items: center; gap: 8px; }
.payment-confirmation input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; margin: 0; }
.form-grid input:not([type="checkbox"]), .form-grid select, .form-grid textarea, .recon-composer input, .recon-composer select { width: 100%; min-width: 0; min-height: 40px; border: 1px solid #bdc9d0; border-radius: 4px; padding: 8px 10px; background: #fff; color: #263d4b; }
.form-grid textarea { min-height: 76px; resize: vertical; }
.form-grid small { color: #75848e; font-weight: 400; line-height: 1.4; }
.span-2 { grid-column: 1 / -1; }
.details-grid { padding-top: 14px; }
.quick-guide { display: flex; justify-content: space-between; background: #edf4f7; padding: 10px 12px; color: #39586b; font-size: 12px; }
.autosave-state { color: #647782; font-size: 12px; text-align: right; }
.code-input, .json-view { font-family: Consolas, "Courier New", monospace !important; font-size: 12px !important; }
.code-input { min-height: 180px !important; }
.json-view { max-height: 55vh; overflow: auto; padding: 14px; background: #1f303b; color: #dce8ef; white-space: pre-wrap; }
.allocations { border: 1px solid #d9e1e5; padding: 12px; }
.allocations legend { padding: 0 6px; font-size: 12px; font-weight: 700; }
.allocation-head, .allocation-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 40px; gap: 7px; margin-bottom: 7px; }
.allocation-head { color: #75838d; font-size: 11px; }
.allocation-total { text-align: right; color: #60717c; font-size: 13px; }
.allocation-total b { color: #244b61; margin-right: 10px; }
.toast-region { position: fixed; z-index: 1200; right: 18px; top: 18px; width: min(390px, calc(100vw - 36px)); display: grid; gap: 8px; }
.toast { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; background: #253d4c; color: #fff; border-left: 4px solid #6bb0d6; box-shadow: 0 8px 24px rgba(0,0,0,.22); font-size: 13px; }
.toast-success { border-color: #48b779; }.toast-warning { border-color: #e2a52c; }.toast-error { border-color: #e2665a; }
.tabs { display: flex; gap: 0; border-bottom: 2px solid #bccbd3; margin-bottom: 15px; overflow-x: auto; }
.tabs button { min-height: 42px; padding: 8px 18px; border: 0; background: transparent; color: #607583; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tabs button.active { background: #2c5870; color: #fff; }
.ledger-card, .transfer-card, .recognition-card, .export-batch { background: #fff; border: 1px solid #dce3e7; margin-bottom: 12px; padding: 15px 17px; min-width: 0; }
.ledger-card header, .transfer-card header, .recognition-card header, .export-batch header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf0f2; padding-bottom: 10px; }
.ledger-card header small, .transfer-card header small, .recognition-card header small, .export-batch header small { display: block; color: #75858f; margin-top: 3px; }
.ledger-amount, .principal-strip, .recognition-totals { display: flex; gap: 22px; flex-wrap: wrap; padding: 13px 0; }
.ledger-amount span, .principal-strip span, .recognition-totals span { color: #6e7d87; font-size: 12px; }
.ledger-amount strong, .principal-strip strong { color: #23495d; }
.transfer-card.in-transit { border: 2px solid #d29622; box-shadow: inset 5px 0 #d29622; }
.principal-strip > div { display: flex; flex-direction: column; gap: 4px; }
.principal-strip .fee { border-left: 1px solid #d6dfe4; padding-left: 22px; }
.position-grid { display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 12px; }
.position-grid span { background: #edf2f4; padding: 5px 8px; color: #5f717c; font-size: 11px; }
.schedule-strip { display: flex; overflow-x: auto; gap: 4px; padding: 10px 0; }
.schedule-strip > span { min-width: 85px; border-top: 3px solid #b9c7ce; background: #f2f5f6; padding: 7px; font-size: 11px; }
.schedule-strip small { display: block; color: #788891; }
.schedule-strip .schedule-posted { border-color: #29945c; background: #e9f6ef; }
.recon-composer > label { display: inline-flex; flex-direction: column; width: calc(50% - 8px); margin-right: 8px; gap: 5px; font-size: 12px; font-weight: 700; }
.recon-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 15px 0; }
.recon-columns section { border: 1px solid #d6e0e5; min-width: 0; }
.recon-columns h3 { padding: 10px; background: #edf2f5; font-size: 13px; }
#bank-options, #movement-options { max-height: 330px; overflow: auto; }
.match-option { display: grid; grid-template-columns: 22px minmax(160px, 1fr) 110px auto; align-items: center; gap: 7px; padding: 8px; border-bottom: 1px solid #edf0f2; font-size: 11px; font-weight: 400; }
.match-option input[type="number"] { min-height: 44px; }
.side-total { padding: 10px; text-align: right; background: #f7f9fa; }
.control-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.control-totals > div { background: #edf2f5; padding: 12px; }
.control-totals span { display: block; color: #6f7f89; font-size: 11px; }
.control-totals b { display: block; margin-top: 4px; font-size: 18px; color: #294c60; }
.blocker-total { padding: 14px; background: #fff4dd; color: #745514; }
.export-batch > div { display: flex; gap: 20px; align-items: center; padding: 11px 0; color: #627580; font-size: 12px; }
.export-batch summary { cursor: pointer; font-weight: 700; color: #31566b; }
.batch-item { display: flex; align-items: center; gap: 8px; border-top: 1px solid #edf0f2; padding: 8px 0; }
.batch-item > span:first-child { flex: 1; min-width: 0; }
.mobile-action-strip, .menu-toggle, .sidebar-backdrop { display: none; }
.pagination { display: flex; justify-content: flex-end; gap: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.fulfillment-lane { margin-bottom: 24px; }
.fulfillment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.fulfillment-card { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid #dce3e7; border-top: 4px solid #365d72; padding: 16px; box-shadow: 0 2px 7px rgba(31,54,69,.05); }
.fulfillment-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fulfillment-card header span:first-child { display: block; color: #75858f; font-size: 11px; }
.fulfillment-card h3 { font-size: 16px; color: #2c3e50; }
.fulfillment-card > p { color: #71808d; font-size: 12px; }
.fulfillment-card > .btn { margin-top: auto; }
.fulfillment-card-lines { display: grid; gap: 5px; border-top: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; padding: 10px 0; font-size: 12px; }
.fulfillment-card-lines span { display: flex; justify-content: space-between; gap: 10px; }
.fulfillment-card-lines small { color: #71808d; }
.fulfillment-source { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; padding: 12px; background: #edf2f5; }
.fulfillment-source > div { min-width: 0; }
.fulfillment-source span:first-child { display: block; color: #6f7f89; font-size: 11px; }
.fulfillment-source strong { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.fulfillment-header { margin-bottom: 14px; }
.fulfillment-lines { min-width: 820px; }
.fulfillment-lines td small { display: block; color: #75858f; margin-top: 3px; }
.fulfillment-lines input:not([type="checkbox"]), .fulfillment-lines select { width: 100%; min-width: 105px; min-height: 44px; border: 1px solid #bdc9d0; border-radius: 4px; padding: 6px 8px; }
.composer-state { min-height: 20px; color: #785b10; font-size: 12px; margin-top: 8px; }
.state-retry { display: flex; justify-content: center; margin-top: -68px; position: relative; }

/* 业务单据台账 */
.register { max-width: 1680px; margin: 0 auto; }
.register-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.register-head h1 { font-size: 24px; }
.register-head .page-actions { flex: none; }
.register-card, .workbench-shell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.register-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--border); }
.register-tabs button { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.register-tabs button span { margin-left: 7px; padding: 1px 6px; border-radius: 10px; background: #F1F5F9; font-variant-numeric: tabular-nums; }
.register-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.register-filter { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.register-filter input, .register-filter select, .batch-delivery-bar select { min-height: 44px; border: 1px solid #CBD5E1; border-radius: var(--radius); padding: 7px 10px; background: #fff; }
.register-search { flex: 1 1 340px; }.register-search input { width: 100%; }
.date-presets { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.date-presets button { min-height: 44px; padding: 0 10px; border: 0; border-right: 1px solid var(--border); background: #fff; color: #475569; cursor: pointer; }
.date-presets button:last-child { border-right: 0; }
.date-range { display: flex; align-items: center; gap: 7px; }.date-range label { display: grid; gap: 2px; color: var(--muted); font-size: 11px; }
.register-table-wrap { overflow: auto; min-height: 180px; }
.register-table, .workbench-table { min-width: 1120px; border-radius: 0 !important; }
.register-table th, .workbench-table th { position: sticky; top: 0; z-index: 1; background: #F8FAFC !important; color: #475569 !important; font-size: 12px !important; }
.register-table .amount, .workbench-table .number { text-align: right; font-variant-numeric: tabular-nums; }
.register-table .date, .workbench-table .date { text-align: center; white-space: nowrap; }
.doc-number, .drawing-no, .number, .amount, .progress + small { font-variant-numeric: tabular-nums; }
.text-action { border: 0; background: transparent; color: #475569; cursor: pointer; padding: 3px 4px; font-weight: 600; text-decoration: none; }
.text-action:hover, .primary-text, .doc-number .text-action { color: var(--primary); text-decoration: underline; }
.text-action:disabled { color: #CBD5E1; cursor: default; text-decoration: none; }
.row-actions { white-space: nowrap; }.row-actions > * { margin-right: 5px; vertical-align: middle; }
.more-menu { position: relative; display: inline-block; }.more-menu summary { color: #475569; cursor: pointer; list-style: none; font-weight: 600; padding: 3px 4px; }
.more-menu:not([open]) > [role="menu"] { display: none; }
/* 顶层菜单：抵消浏览器给 [popover] 的默认居中与边框；不支持 Popover 时抬高所在粘性操作列 */
.more-menu > [role="menu"][popover] { left: var(--menu-left, 8px); top: var(--menu-top, 8px); right: auto; bottom: auto; margin: 0; width: auto; height: auto; overflow: visible; color: inherit; }
@supports not selector(:popover-open) { .row-actions:has(> .more-menu[open]), td:has(> .more-menu[open]) { z-index: 20; } }
.more-menu > div { position: fixed; z-index: 1000; left: var(--menu-left, 8px); top: var(--menu-top, 8px); min-width: 145px; display: grid; padding: 5px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(15,23,42,.14); }
.more-menu > div button { border: 0; background: #fff; padding: 8px 10px; text-align: left; cursor: pointer; }.more-menu > div button:hover { background: #F1F5F9; }
.register-footer { position: sticky; bottom: 0; z-index: 3; min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); background: rgba(255,255,255,.97); color: #475569; font-size: 13px; }
.register-summary { font-variant-numeric: tabular-nums; }.register-pager { display: flex; align-items: center; gap: 10px; white-space: nowrap; }.register-pager select { margin-left: 5px; padding: 5px; border: 1px solid var(--border); }
.register-state { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--muted); text-align: center; }.register-state.state-error { color: #991B1B; }
.muted { color: var(--muted); }.detail-section-title { margin: 16px 0 8px; font-weight: 700; }.review-history { display: grid; gap: 8px; list-style: none; }.review-history li { border-left: 3px solid var(--border); padding-left: 10px; }.review-history li span { margin-left: 8px; color: var(--muted); font-size: 12px; }.review-history li p { margin-top: 3px; font-size: 13px; }

/* 履约工作台 */
.workbench-search { display: flex; gap: 8px; min-width: min(420px, 100%); }.workbench-search input { flex: 1; min-height: 44px; border: 1px solid #CBD5E1; border-radius: var(--radius); padding: 7px 10px; }.workbench-tabs { margin: 0; }.batch-delivery-bar { display: grid; grid-template-columns: auto minmax(280px,1fr) auto; gap: 14px; align-items: center; padding: 13px 16px; background: #EFF6FF; border-bottom: 1px solid #BFDBFE; }.batch-delivery-bar label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }.batch-delivery-bar p { color: #1E40AF; font-size: 12px; line-height: 1.5; }.batch-actions { display: flex; align-items: center; gap: 8px; }.batch-actions [role="status"] { color: #1E40AF; font-size: 12px; font-weight: 700; }
.workbench-table { min-width: 1050px; }.workbench-task.due-overdue td { background: #FFF1F2; }.workbench-task.due-soon td { background: #FFFBEB; }
.expand-button { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 4px; background: #fff; cursor: pointer; }.due-badge { display: inline-flex; padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; }.due-overdue { color: #DC2626; }.due-badge.due-overdue { background: #FEF2F2; }.due-soon { color: #D97706; }.due-badge.due-soon { background: #FEF3C7; }.due-normal { color: #059669; }.due-unset { color: var(--muted); }
.progress { width: 110px; height: 7px; overflow: hidden; border-radius: 4px; background: #E2E8F0; }.progress span { display: block; height: 100%; background: var(--primary); }.workbench-table small { color: var(--muted); }
.expanded-host > td { padding: 0 !important; background: #F8FAFC !important; }.workbench-lines { width: calc(100% - 42px); margin: 8px 16px 12px 42px; border-collapse: collapse; background: #fff; }.workbench-lines th, .workbench-lines td { padding: 8px 10px; border: 1px solid var(--border); font-size: 12px; }.workbench-lines small { display: block; }.drawing-no:not(:empty) { display: block; color: #334155; font-weight: 700; }.workbench-qty { width: 105px; padding: 6px 8px; border: 1px solid #CBD5E1; border-radius: 4px; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .menu-toggle { display: flex; align-items: center; justify-content: center; position: fixed; z-index: 950; top: 10px; left: 10px; width: 44px; height: 44px; border: 0; border-radius: 6px; background: var(--sidebar); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 940; width: min(290px, 84vw); transform: translateX(-105%); transition: transform .18s ease; box-shadow: 8px 0 28px rgba(0,0,0,.26); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; z-index: 930; background: rgba(12,24,32,.48); }
  .content { padding: 66px 14px 24px; width: 100%; }
  .finance-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .finance-header h1 { font-size: 21px; }
  .page-actions { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .page-actions .btn { flex: none; }
  .finance-split, .recon-columns { grid-template-columns: 1fr; }
  .dialog-backdrop { padding: 0; align-items: flex-end; }
  .dialog { width: 100%; max-height: 92vh; border-top-width: 4px; }
  .dialog-wide { width: 100%; }
  .mobile-action-strip { position: sticky; top: -1px; z-index: 8; display: flex; gap: 8px; padding: 8px; margin: -6px -4px 12px; background: rgba(245,246,250,.96); }
  .match-option { grid-template-columns: 22px minmax(130px, 1fr) 95px; }
  .match-option > b { grid-column: 2 / -1; text-align: right; }
  .register-head { align-items: stretch; flex-direction: column; }.register-head .page-actions { flex-wrap: wrap; }.register-search { min-width: 0; flex-basis: 100%; }.date-presets { flex-wrap: wrap; }.register-filter { align-items: stretch; }.date-range { flex: 1 1 100%; }.date-range label { flex: 1; min-width: 0; }.date-range input { width: 100%; min-width: 0; }.batch-delivery-bar { grid-template-columns: 1fr; }.batch-actions { flex-wrap: wrap; }.register-footer { position: static; flex-direction: column; align-items: stretch; }.register-pager { justify-content: space-between; }
}

@media (max-width: 600px) {
  .login-box { width: calc(100vw - 28px); padding: 28px 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: 1; }
  .quick-guide { flex-direction: column; gap: 4px; }
  .account-grid { grid-template-columns: 1fr; }
  .finance-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .finance-kpis .kpi { padding: 12px; }
  .finance-kpis .kpi .value { font-size: 18px; }
  .ledger-amount, .principal-strip, .recognition-totals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .principal-strip .fee { border-left: 0; padding-left: 0; }
  .control-totals { grid-template-columns: 1fr; }
  .recon-composer > label { width: 100%; margin: 0 0 9px; }
  .allocation-head { display: none; }
  .allocation-row { grid-template-columns: 1fr 1fr 38px; border-bottom: 1px solid #dce4e8; padding-bottom: 8px; }
  .allocation-row select { grid-column: 1 / -1; }
  .audit-row, .balance-row { grid-template-columns: 1fr auto; }
  .audit-row .status, .balance-row small { grid-column: 1 / -1; }
  .export-batch > div, .batch-item { align-items: flex-start; flex-wrap: wrap; }
  .batch-item > span:first-child { flex-basis: 100%; }
  .finance-table { min-width: 720px; }
  .finance-table th:last-child, .finance-table td:last-child { position: sticky; right: 0; z-index: 2; min-width: 130px; background: #fff; box-shadow: -5px 0 8px rgba(25,48,62,.08); }
  .finance-table th:last-child { z-index: 3; background: #edf2f5 !important; }
  .finance-table .actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  .finance-table .actions .btn { width: 100%; white-space: nowrap; }
  .ledger-card .actions, .transfer-card .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-card .actions .btn, .transfer-card .actions .btn { width: 100%; }
  .fulfillment-grid { grid-template-columns: 1fr; }
  .fulfillment-card { padding: 14px; }
  .fulfillment-source { grid-template-columns: 1fr; }
  .fulfillment-lines { min-width: 0; }
  .fulfillment-lines thead { display: none; }
  .fulfillment-lines, .fulfillment-lines tbody, .fulfillment-lines tr, .fulfillment-lines td { display: block; width: 100%; }
  .fulfillment-lines tr { border-bottom: 2px solid #dce3e7; padding: 8px 0; }
  .fulfillment-lines td { border: 0; padding: 6px 10px; }
  .fulfillment-lines td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #71808d; font-size: 11px; font-weight: 700; }
  .fulfillment-lines td:first-child { float: right; width: auto; }
  .fulfillment-lines input:not([type="checkbox"]), .fulfillment-lines select { min-height: 42px; }
  .workbench-search { width: 100%; min-width: 0; }
  .workbench-table { min-width: 760px; }
  .workbench-lines { width: calc(100% - 16px); margin: 8px; }
  .workbench-lines thead { display: none; }
  .workbench-lines, .workbench-lines tbody, .workbench-lines tr, .workbench-lines td { display: block; width: 100%; }
  .workbench-lines tr { border-bottom: 2px solid var(--border); padding: 8px; }
  .workbench-lines td { border: 0; padding: 5px; text-align: left !important; }
  .workbench-lines td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
  .workbench-qty { width: 100%; min-height: 42px; }
  /* 费用登记表 <=600px 卡片化（复用 fulfillment-lines 卡片 primitive） */
  .finance-table[data-expense-cards] { min-width: 0; }
  .finance-table[data-expense-cards] thead { display: none; }
  .finance-table[data-expense-cards], .finance-table[data-expense-cards] tbody,
  .finance-table[data-expense-cards] tr, .finance-table[data-expense-cards] td { display: block; width: 100%; }
  .finance-table[data-expense-cards] tr { border: 1px solid #dce3e7; border-radius: 10px; margin: 0 0 10px; padding: 6px 10px; background: #fff; }
  .finance-table[data-expense-cards] td { border: 0; padding: 6px 4px; text-align: left !important; }
  .finance-table[data-expense-cards] td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #71808d; font-size: 11px; font-weight: 700; }
  .finance-table[data-expense-cards] td.actions { position: static; min-width: 0; box-shadow: none; }
  .finance-table[data-expense-cards] td:first-child { float: none; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 原生 hidden 属性优先于 .form-row label 的 display:flex（条款面板条件显示依赖） */
[hidden] { display: none !important; }

/* Excel 导入：类型选择 + 三步面板 */
.import-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.import-kinds { display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.import-kind { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.import-kind .icon { width: 20px; height: 20px; color: var(--muted); flex: none; }
.import-kind span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.import-kind b { font-size: 14px; }
.import-kind small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.import-kind:hover { background: #F1F5F9; }
.import-kind[aria-pressed="true"] { background: #EFF6FF; border-color: #BFDBFE; }
.import-kind[aria-pressed="true"] .icon { color: var(--primary); }
.import-host .section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.import-host .section-head h2 { font-size: 17px; }
.import-steps { list-style: none; display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; }
.import-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 14px 0 18px; border-bottom: 1px solid var(--border); }
.import-steps li:last-child { border-bottom: 0; }
.import-steps li > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.import-steps b { font-size: 14px; }
.import-steps small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.import-step-no { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid #CBD5E1; color: var(--muted); font-size: 13px; font-weight: 600; }
.import-steps li.is-current .import-step-no { border-color: var(--primary); background: var(--primary); color: #fff; }
.import-template { align-self: flex-start; }
.import-dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 18px; border: 1.5px dashed #CBD5E1; border-radius: 8px; background: #F8FAFC; cursor: pointer; text-align: center; }
.import-dropzone:hover, .import-dropzone:focus-within, .import-dropzone.is-over { border-color: var(--primary); background: #EFF6FF; }
.import-dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.import-dropzone-icon { color: var(--primary); }
.import-dropzone-text { font-size: 14px; color: var(--text); }
.import-file-name { font-size: 12px; }
.import-option { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #465c6b; }
.import-option select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.import-actions { display: flex; gap: 8px; }
.import-result:not(:empty) { margin-top: 14px; }
.ledger-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
@media (max-width: 900px) { .import-layout { grid-template-columns: 1fr; } .import-kinds { flex-direction: row; overflow-x: auto; } .import-kind { min-width: 180px; } .ledger-banner { flex-direction: column; align-items: flex-start; } }

/* 单据邮件 */
.email-section { display: block; margin-bottom: 14px; }
.email-label { font-size: 12px; font-weight: 700; color: #465c6b; margin-bottom: 6px; display: block; }
.email-recipient { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 6px; cursor: pointer; }
.email-recipient input { margin-top: 3px; }
.email-recipient > span { display: flex; flex-direction: column; gap: 2px; }
.email-recipient-name { display: inline; }
.email-recipient-name .badge { margin-left: 4px; }
.email-recipient small { color: var(--muted); }
.email-cc-list { display: flex; flex-wrap: wrap; gap: 8px; }
.email-cc { padding: 4px 10px; border-radius: 4px; background: #F1F5F9; font-size: 13px; }
.email-cc b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.email-preview { max-height: 40vh; overflow: auto; padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }

/* 审批与复核设置 */
.policy-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 18px; }
.policy-mode { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 8px; cursor: pointer; }
.policy-mode.is-active { border-color: var(--primary); background: #EFF6FF; }
.policy-mode span { display: flex; flex-direction: column; gap: 4px; }
.policy-mode small { color: var(--muted); font-size: 12px; line-height: 1.45; }
#security-policy-form > p { margin-bottom: 14px; }
#security-policy-form fieldset { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
#security-policy-form legend { font-weight: 600; margin-bottom: 10px; }
#security-policy-form .notice p { margin: 6px 0 0; }
.policy-table td { vertical-align: top; }
.policy-table td small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.4; }
.policy-table select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; width: 100%; }
.policy-group th { background: #F1F5F9; font-size: 13px; color: #465c6b; }
.policy-effective { color: var(--muted); font-size: 13px; }
.policy-warn { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #FEF2F2; color: #B91C1C; font-size: 11px; font-weight: 700; }
.policy-risky td { background: #FFFBFA; }

/* Expense batch editor keeps each payment's account/date/fee visibly separate. */
.expense-batch-editor .table-wrap { overflow-x: auto; margin: 16px 0; }
.expense-batch-editor td { vertical-align: top; }
.expense-batch-editor td label { display: inline-flex; flex-direction: column; gap: 4px; margin: 0 12px 10px 0; max-width: 240px; }
.expense-batch-editor td input:not([type="checkbox"]), .expense-batch-editor td select { width: 100%; min-width: 140px; }
.expense-batch-editor td small { display: block; margin: 6px 0; }
@media (max-width: 680px) { .expense-batch-editor table { min-width: 560px; } }
.expense-batch-editor { font-size: 14px; line-height: 1.5; }
.expense-batch-editor table { width: 100%; border-collapse: collapse; }
.expense-batch-editor th, .expense-batch-editor td { padding: 12px 8px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.expense-batch-editor th { color: #475569; background: #f8fafc; white-space: nowrap; }
.expense-batch-editor th:first-child { width: 40px; }
.expense-batch-editor td:nth-child(2) { width: 170px; min-width: 170px; }
.expense-batch-editor td:nth-child(3) label { width: calc(33.333% - 14px); min-width: 145px; margin-right: 10px; }
.expense-batch-editor select, .expense-batch-editor input:not([type="checkbox"]) { font: inherit; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #0f172a; box-sizing: border-box; }
.expense-batch-editor input[type="checkbox"] { width: 16px; height: 16px; margin-right: 8px; vertical-align: middle; accent-color: #287fb8; }
.expense-batch-editor > label:first-child { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; font-weight: 600; }
.expense-batch-editor .toolbar { margin: 16px 0; gap: 12px; }
.expense-batch-editor td p { margin: 6px 0; color: #64748b; font-size: 13px; }

/* Financial progress remains readable in narrow document registers. */
.register-table:has(.finance-progress) { min-width: 1450px; }
.register-table .finance-progress { min-width: 152px; text-align: left; white-space: nowrap; text-decoration: none; }
.finance-progress small { display: block; color: #64748b; font-size: 11px; font-weight: 400; line-height: 1.6; }
.register-table .badge { white-space: nowrap; }

/* Invoice work queue shares the existing finance layout and field sizing. */
.invoice-queue-filters { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0; }
.invoice-queue-filters select, .invoice-queue-filters input { min-height:40px; border:1px solid #bdc9d0; border-radius:4px; padding:8px 10px; background:#fff; color:#263d4b; }
.invoice-queue-filters input { flex:1; min-width:180px; }

/* PDF invoice matching workspace: quiet hierarchy, persistent controls. */
.invoice-workspace .dialog { width: min(1600px, 98vw); max-width:98vw; height:94vh; display:flex; flex-direction:column; }
.invoice-workspace .dialog-body { padding:0; flex:1; min-height:0; overflow:hidden; }
.invoice-workbench {height:100%;display:flex;flex-direction:column;background:var(--bg,#f5f7fa);}
.invoice-summary {display:flex;justify-content:space-between;gap:24px;padding:16px 24px;background:var(--surface,#fff);border-bottom:1px solid #e5e9ef;}
.invoice-summary strong {display:block;font-size:18px;}.invoice-summary span,.invoice-line-main small {display:block;color:#64748b;font-size:12px;margin-top:5px;}
.invoice-header {padding:8px 24px;background:var(--surface,#fff);}.invoice-header-fields {display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:12px 0;}
.invoice-header-fields label,.invoice-line-detail label {display:flex;flex-direction:column;gap:4px;font-size:12px;}
.invoice-toolbar {display:flex;gap:12px;align-items:center;padding:10px 24px;flex-wrap:wrap;}.invoice-toolbar [data-search]{flex:1;min-width:140px;}
.invoice-split {display:flex;flex:1;min-height:0;gap:16px;padding:0 20px;}.invoice-original {width:35%;min-width:230px;resize:horizontal;overflow:auto;background:#e4e8ed;border-radius:8px;}
.invoice-page-nav {position:sticky;top:0;z-index:2;display:flex;gap:6px;padding:8px;background:#edf0f4;flex-wrap:wrap;align-items:center;}
.invoice-image-wrap {position:relative;}.invoice-image-wrap img {display:block;width:100%;}.invoice-highlight {position:absolute;left:0;right:0;background:#ffc10733;outline:2px solid #e4ad20;pointer-events:none;}
.invoice-match-list {flex:1;overflow:auto;min-width:0;padding-bottom:14px;}.invoice-line {background:var(--surface,#fff);border:1px solid #e2e8f0;border-radius:9px;margin-bottom:10px;padding:12px 14px;}
.invoice-line-main {display:flex;align-items:center;gap:14px;}.invoice-line-identity {flex:1;min-width:0;}.invoice-line-identity strong {display:block;overflow-wrap:anywhere;}.invoice-line-identity span {display:block;font-size:12px;color:#64748b;margin-top:4px;}
.invoice-match-state {font-size:12px;color:#926111;background:#fff5d9;padding:4px 8px;border-radius:4px;white-space:nowrap;}.invoice-match-state.exact {color:#17674d;background:#e9f6ef;}
.invoice-line details {margin-top:10px;}.invoice-line summary {cursor:pointer;font-size:12px;color:#526477;}.invoice-choice {display:grid;grid-template-columns:90px 1fr 1fr;gap:8px;padding:10px 0;border-bottom:1px solid #edf0f4;}
.invoice-choice>select {grid-column:2/4;min-width:0;width:100%;}.invoice-choice label {font-size:12px;display:flex;flex-direction:column;gap:3px;}.invoice-choice input{width:100%;min-width:0;}.invoice-choice input[type=checkbox]{width:auto;}.invoice-choice .invoice-reason{grid-column:1/4;}.invoice-choice [data-remove]{justify-self:start;grid-column:1/4;}
.invoice-line-detail[open] {display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}.invoice-line-detail summary,.invoice-line-detail p {grid-column:1/-1;}
.invoice-bottom {display:flex;gap:15px;justify-content:space-between;padding:12px 24px;background:var(--surface,#fff);border-top:1px solid #e2e8f0;font-size:12px;flex-wrap:wrap;}.invoice-bottom [data-totals]{font-weight:600;font-size:14px;}
.invoice-difference {font-size:12px;color:#95621c;background:#fff9ec;padding:8px;border-radius:4px;}.invoice-split.hide-original .invoice-original{display:none;}
.invoice-upload{padding:12px 0;}.invoice-drop {display:block;border:1px dashed #a4b5c8;border-radius:10px;padding:28px;background:#f8fafc;}.invoice-drop input {display:block;margin-top:12px;}.invoice-recent{display:flex;flex-direction:column;gap:8px;max-height:35vh;overflow:auto;}.invoice-recent button{text-align:left;overflow-wrap:anywhere;}.invoice-recent small{display:block;color:#64748b;}.invoice-success{margin:auto;text-align:center;padding:24px;}
@media(max-width:850px){.invoice-workspace .dialog{height:98vh;}.invoice-original{width:100%;min-width:0;}.invoice-split:not(.hide-original) .invoice-match-list{display:none;}.invoice-header-fields{grid-template-columns:repeat(2,1fr);}.invoice-line-main{gap:8px;flex-wrap:wrap;}.invoice-summary{padding:12px;}.invoice-toolbar{padding:8px 12px;}.invoice-split{padding:0 8px;}.invoice-line-detail[open]{grid-template-columns:repeat(2,1fr);}}
.invoice-candidate-search{grid-column:1/4;display:flex;gap:6px;align-items:center;}.invoice-candidate-search input{flex:1;}.invoice-candidate-search small{white-space:nowrap;color:#64748b;}
.invoice-stored {margin-top:10px;padding:8px 10px;background:#f1f7f4;border-radius:6px;font-size:12px;}.invoice-stored>div{display:flex;justify-content:space-between;gap:10px;padding:3px 0;}.invoice-stored span{color:#526b5f;}
.invoice-workbench input:not([type=checkbox]),.invoice-workbench select,.invoice-workbench textarea {font:inherit;font-size:13px;border:1px solid #d5deea;border-radius:6px;background:#fff;color:#25364a;padding:7px 10px;min-height:34px;box-sizing:border-box;}
.invoice-workbench input:focus,.invoice-workbench select:focus{outline:2px solid #a9d3f5;outline-offset:1px;}.invoice-workbench input[type=checkbox]{width:16px;height:16px;accent-color:#2a80b9;flex-shrink:0;}
.invoice-choice label:first-child{flex-direction:row;align-items:center;justify-content:flex-start;}.invoice-choice [data-value=amount],.invoice-choice [data-value=tax_amount],.invoice-choice [data-value=quantity]{text-align:right;font-variant-numeric:tabular-nums;}
.invoice-match-target{color:#32795b!important;font-size:12px!important;margin-top:6px!important;}.invoice-line-main>div:not(.invoice-line-identity){text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;}.invoice-line-main [data-line-toggle]{margin:0;}
.invoice-workspace .dialog-error:empty{display:none;}.invoice-workbench details>summary{padding:3px 0;}.invoice-page-nav .btn{padding:5px 8px;min-width:30px;}

.invoice-partner-row{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:12px 0;border-top:1px solid #e2e8f0}.invoice-partner-row>div{min-width:0;overflow-wrap:anywhere}.invoice-partner-row .btn{flex-shrink:0}@media(max-width:600px){.invoice-partner-row{align-items:flex-start;flex-direction:column}}

/* Compact list stages; business progress and financial progress stay separate. */
.register-stage-note { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.register-tabs button:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }

/* Financial status keeps its text label; color is a supplementary cue. */
.finance-status { display: inline-block; padding: 2px 8px; border-radius: 4px; font-weight: 600; line-height: 1.6; }
.finance-status-success { color: #166534; background: #dcfce7; }
.finance-status-info { color: #1e40af; background: #dbeafe; }
.finance-status-pending { color: #92400e; background: #fef3c7; }
.finance-status-attention { color: #991b1b; background: #fee2e2; }
.finance-status-neutral { color: #475569; background: #f1f5f9; }

/* Sales register: business identity first, detail available without leaving the list. */
.sales-view-bar,.list-view-toolbar,.workspace-toolbar,.workspace-tabs,.workspace-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px 0}
.sales-view-bar{padding:12px 16px;border-bottom:1px solid #e2e8f0}
.sales-register{table-layout:fixed}.sales-register td{vertical-align:top;white-space:normal;overflow-wrap:anywhere}.sales-register.comfortable td{padding-top:16px;padding-bottom:16px}.sales-register.compact td{padding-top:7px;padding-bottom:7px}
.sales-identity strong{display:block;margin-bottom:6px}.sales-item-summary{display:grid;grid-template-columns:1fr auto;gap:3px 8px;margin-bottom:8px}.sales-item-summary small{grid-column:1/-1;color:#64748b}.sales-lines small{display:block;color:#64748b;margin-top:4px}.sales-lines{min-width:660px}
.preference-table input[type=number]{width:95px}.preference-table tr[draggable]{cursor:grab}.list-view-toolbar label{display:grid;gap:4px}
.workspace-identity{display:grid;gap:6px;padding:16px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px}.workspace-identity strong{font-size:20px}.workspace-identity small{color:#64748b}.workspace-tabs{position:sticky;top:0;background:white;z-index:2;border-bottom:1px solid #e2e8f0}
.chain-section{margin:14px 0;border:1px solid #e2e8f0;border-radius:8px;padding:12px}.chain-section>summary{font-weight:600;cursor:pointer;margin-bottom:8px}.chain-node{border-left:3px solid #93c5fd;padding:10px 12px;margin:12px 0;background:#f8fafc}.chain-node>div:first-child{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.chain-node small{display:block;color:#64748b;margin-top:5px}.chain-edge{margin:10px 0 0 12px;border-top:1px solid #e2e8f0;padding-top:8px}.chain-history{border-left-color:#cbd5e1;background:#f1f5f9}.dialog.workspace-wide{width:min(1440px,96vw)!important;max-width:96vw!important}.dialog.workspace-wide [data-workspace-content]{min-width:0}.workspace-actions{border-top:1px solid #e2e8f0}
@media(max-width:600px){.dialog.workspace-wide,.dialog.dialog-drawer:has(.workspace-toolbar){width:100vw!important;max-width:100vw!important}.workspace-toolbar .btn,.workspace-tabs .btn{width:auto;flex:1 1 auto}.workspace-identity strong{font-size:17px}.list-view-toolbar label{width:100%}.preference-table .btn{width:auto}}
.chain-path{display:flex;gap:8px;flex-wrap:wrap;color:#1e40af;padding:12px 0;font-weight:600}.chain-path span{background:#eff6ff;padding:6px 10px;border-radius:5px}.dialog.workspace-wide .chain-section{margin-top:16px}.chain-node .finance-progress{display:inline-block;margin:6px 18px 6px 0;text-align:left}
@media(min-width:1000px){.dialog.workspace-wide [data-workspace-content]:has(.chain-path){display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.dialog.workspace-wide .chain-path,.dialog.workspace-wide [data-workspace-content]>p,.dialog.workspace-wide .chain-section:has([data-section-body=lines]){grid-column:1/-1}}
.sales-register th:last-child,.sales-register td:last-child{min-width:150px;width:150px}.sales-register .finance-status{white-space:normal}.sales-register .row-actions{position:sticky;right:0;background:white;box-shadow:-3px 0 5px #0f172a08}.sales-register .row-actions .text-action{display:inline-block;margin-bottom:5px}
.sales-identity>div{display:flex;align-items:center;gap:4px}.sales-identity [data-action=detail]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.sales-identity [data-action=sales-expand],.sales-identity [data-action=copy-sales-number]{flex-shrink:0}

/* Sales reading surface: a business order and its details share a stripe. */
.sales-register .sales-white { --sales-row-bg:#fff; }
.sales-register .sales-stripe { --sales-row-bg:#f3f6fa; }
.sales-register tbody tr { background:var(--sales-row-bg,#fff); }
.sales-register tbody tr:hover { --sales-row-bg:#eaf2fc; }
.sales-register tbody tr.sales-current { --sales-row-bg:#dceafe; }
.sales-register tbody td,.sales-register .row-actions { background:var(--sales-row-bg,#fff);border-bottom:1px solid #e2e8f0; }
.sales-register button:focus-visible,.sales-customer-group button:focus-visible { outline:2px solid #1d4ed8;outline-offset:2px; }
.sales-register .sales-identity strong { display:block;margin-bottom:7px; }
.grouped-sales .sales-identity>strong { display:none; }
.sales-customer-group { margin:12px 0 20px;border:1px solid #cbd5e1;border-radius:8px;overflow:hidden; }
.sales-customer-group>header { display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;background:#eaf0f7;padding:12px 16px;color:#334155; }
.sales-customer-group .group-toggle { border:0;background:transparent;text-align:left;font-size:15px;font-weight:650;color:#1e293b;cursor:pointer; }
.sales-customer-group small { color:#475569;font-weight:normal;font-size:12px; }
.sales-customer-group [data-group-body] { padding:8px; }
.sales-customer-group [data-group-body][hidden] { display:none; }
.group-order-note,.group-caption { color:#475569;font-size:13px;padding:6px 12px; }
.sales-view-bar { flex-wrap:wrap; }
.sales-register.register-table:has(.finance-progress) { min-width:1120px; }
.sales-register.register-table .finance-progress { min-width:0;max-width:100%;white-space:normal; }
.sales-register small,.sales-register .muted { color:#475569; }
table.data.sales-register { overflow:visible; }
table.data.sales-register tr:hover td { background:var(--sales-row-bg,#fff); }
.sales-register .row-actions { z-index:1; }
.sales-register th:last-child { right:0;z-index:2; }

/* Purchase source picker: readable document summaries and independent line selection. */
.purchase-source-picker .source-panes { display:grid; grid-template-columns:minmax(250px, .8fr) minmax(380px, 1.6fr); gap:18px; }
.purchase-source-picker .source-panes > section { min-width:0; }
.purchase-source-picker .source-candidate { border:1px solid var(--border,#dce1e7); border-radius:8px; padding:12px; margin:0 0 10px; overflow-wrap:anywhere; }
.purchase-source-picker .source-candidate strong { display:block; margin:5px 0; }
.purchase-source-picker .source-candidate small { color:var(--muted,#64748b); }
.purchase-source-picker .source-filters input { min-width:0; max-width:100%; }
.purchase-source-picker .source-filters [data-search] { width:300px; }
.purchase-source-picker .source-table-scroll { overflow:auto; }
.purchase-source-picker table { width:100%; border-collapse:collapse; }
.purchase-source-picker td,.purchase-source-picker th { text-align:left; padding:9px; border-bottom:1px solid #dce1e7; vertical-align:top; }
.purchase-source-picker td { overflow-wrap:anywhere; }
.purchase-source-picker input[data-qty] { width:105px; }
.purchase-source-picker [data-selection] { margin-top:14px; padding:10px; background:#f0f6ff; }
.purchase-source-picker [data-pages],.purchase-source-picker [data-line-pages] { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; }
#e-source-editor { padding:10px 0; }
@media (max-width:900px) { .purchase-source-picker .source-panes { grid-template-columns:minmax(0,1fr); } }

/* Supplier direct shipment workspace */
.direct-workspace > details { margin:16px 0; border-top:1px solid #dfe6ec; padding-top:14px; }
.direct-workspace summary { cursor:pointer; font-weight:600; margin-bottom:14px; }
.direct-summary,.direct-batch-heading,.direct-actions {display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.direct-summary {color:#526477;margin-bottom:16px;}
.direct-batch {border:1px solid #dfe6ec;border-radius:8px;padding:14px;margin:12px 0;background:#fff;}
.direct-result {border-left:4px solid #268368;background:#f3faf7;}
.direct-batch p {margin:8px 0;overflow-wrap:anywhere;}
.direct-identity {display:block;color:#526477;margin-top:5px;white-space:normal;}
.direct-workspace td {vertical-align:top;}
.direct-workspace input[aria-label="本次直发数量"] {width:110px;}
.direct-actions {margin:12px 0;}
/* WP-015 经营分析 */
.analytics-group { margin-bottom: 18px; }
.analytics-group h2 { font-size: 15px; color: #2c3e50; margin: 6px 0 10px; }
.analytics-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.analytics-kpi { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; font: inherit; color: var(--text); }
button.analytics-kpi { cursor: pointer; }
button.analytics-kpi:hover, button.analytics-kpi:focus-visible { border-color: var(--primary); background: #EFF6FF; }
.analytics-kpi-label { color: var(--muted); font-size: 12px; }
.analytics-kpi strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.analytics-kpi small { color: var(--muted); font-size: 12px; }
.analytics-bar { display: block; width: 100%; min-width: 80px; height: 6px; margin-top: 4px; border-radius: 3px; background: #E2E8F0; overflow: hidden; }
.analytics-bar > span { display: block; height: 100%; background: var(--primary); }
.analytics-bar.is-negative > span { background: #DC2626; }
.analytics-disclosure ul { margin: 6px 0 0 18px; }
.analytics-period [hidden] { display: none; }
.sort-button { border: 0; background: transparent; font: inherit; font-weight: 600; color: inherit; cursor: pointer; padding: 0; }

/* WP-024 首页驾驶舱 */
.cockpit-window { margin: -6px 0 14px; color: var(--muted); font-size: 13px; }
.cockpit-cards { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 1100px) { .cockpit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cockpit-cards { grid-template-columns: 1fr; } }
.cockpit-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.cockpit-card h3 { font-size: 13px; font-weight: 600; color: var(--muted); }
.cockpit-card-main { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; }
button.cockpit-card-main { cursor: pointer; }
button.cockpit-card-main:hover .cockpit-value, button.cockpit-card-main:focus-visible .cockpit-value { color: var(--primary); }
.cockpit-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.cockpit-more { color: var(--muted); font-size: 20px; line-height: 1; }
button.cockpit-card-main:hover .cockpit-more { color: var(--primary); }
.cockpit-compare { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.cockpit-compare b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cockpit-compare.is-good b { color: #1e8449; }
.cockpit-compare.is-bad b { color: #c0392b; }
.cockpit-compare.is-neutral b { color: #475569; }
.cockpit-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding-top: 6px; border-top: 1px solid #F1F5F9; font-size: 13px; color: #475569; }
.cockpit-sub b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.cockpit-sub small { color: var(--muted); font-size: 12px; }
.cockpit-sub .cockpit-sub-compare { width: 100%; }
.cockpit-sub-compare.is-good { color: #1e8449; }
.cockpit-sub-compare.is-bad { color: #c0392b; }
.cockpit-sub.is-bad b { color: #c0392b; }
.cockpit-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.cockpit-warning { padding: 6px 8px; border-left: 3px solid #d18b12; background: #fff7df; color: #6d5319; font-size: 12px; }
.cockpit-section { margin-bottom: 18px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.cockpit-section h2 { font-size: 16px; margin-bottom: 10px; }
.cockpit-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.cockpit-section-head h2 { margin-bottom: 0; }
.cockpit-alerts { list-style: none; display: grid; gap: 8px; }
.cockpit-alert { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 6px; }
.cockpit-alert.is-danger { border-left-color: #c0392b; }
.cockpit-alert.is-warning { border-left-color: #d18b12; }
.cockpit-alert.is-info { border-left-color: var(--primary); }
.cockpit-level { padding: 2px 6px; border-radius: 4px; background: #F1F5F9; color: #334155; font-size: 11px; font-weight: 700; }
.cockpit-alert.is-danger .cockpit-level { background: #FEF2F2; color: #991B1B; }
.cockpit-alert.is-warning .cockpit-level { background: #FEF3C7; color: #92400E; }
.cockpit-alert-body small { display: block; color: var(--muted); margin-top: 2px; }
.cockpit-count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 10px; background: #F1F5F9; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cockpit-alert-actions { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.cockpit-items { margin: 6px 0 0 16px; font-size: 13px; line-height: 1.7; }
.cockpit-charts { display: grid; gap: 14px; }
.cockpit-figure figcaption { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.cockpit-chart { display: block; width: 100%; height: auto; }
.cockpit-chart-wrap { overflow-x: auto; }
.cockpit-chart { min-width: 600px; max-height: 300px; }
.cockpit-figure.is-small .cockpit-chart { max-height: 200px; }
.cockpit-empty { padding: 18px 0; color: var(--muted); font-size: 13px; }
.cockpit-notice { margin-left: 8px; }
.cockpit-notice::before { content: '·'; margin-right: 8px; }
.cockpit-explain-toggle { align-self: flex-start; margin-top: 2px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline dotted; cursor: pointer; }
.cockpit-explain-toggle:hover, .cockpit-explain-toggle:focus-visible { color: var(--primary); }
.cockpit-explain { display: grid; gap: 4px; list-style: none; padding: 8px 10px; background: var(--page); border-radius: 6px; font-size: 12px; }
.cockpit-detail { display: flex; justify-content: space-between; gap: 8px; color: #475569; }
.cockpit-detail b { font-variant-numeric: tabular-nums; }
.cockpit-grid { stroke: #E2E8F0; stroke-width: 1; }
.cockpit-grid.is-zero { stroke: #94A3B8; }
.cockpit-axis { fill: #475569; font-size: 12px; }
.cockpit-bar { rx: 2; }
.cockpit-line { stroke-width: 2; }
.cockpit-dot { stroke: #fff; stroke-width: 2; }
.cockpit-hit { fill: transparent; }
.cockpit-month:hover .cockpit-hit, .cockpit-month:focus .cockpit-hit { fill: rgba(37, 99, 235, .06); }
.cockpit-month:focus { outline: none; }
.cockpit-month:focus-visible .cockpit-hit { stroke: var(--primary); stroke-width: 1; }
.cockpit-legend { display: flex; gap: 14px; list-style: none; margin-bottom: 4px; font-size: 12px; color: #475569; }
.cockpit-key { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.cockpit-key.is-line { height: 2px; width: 14px; vertical-align: 3px; }
.cockpit-table-title { font-size: 13px; margin: 10px 0 6px; }
.cockpit-other { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.cockpit-other-item { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.cockpit-other-item span { color: var(--muted); }
.register-chip { display: flex; gap: 10px; align-items: center; padding: 8px 16px; background: #EFF6FF; border-bottom: 1px solid #BFDBFE; color: #1E40AF; font-size: 13px; }
@media (max-width: 720px) {
  .cockpit-alert { grid-template-columns: 1fr; }
  .cockpit-value { font-size: 20px; }
}

/* WP-031b-1 询价单：供应商报价页（免登录）与比价表 */
.rfq-public-main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; }
.rfq-public-head h1 { font-size: 20px; margin: 6px 0 10px; }
.rfq-public-head p { margin: 6px 0; }
.rfq-public .data input, .rfq-public .data select { width: 100%; min-width: 72px; }
.rfq-delivery { white-space: nowrap; }
.rfq-delivery input { width: 64px; min-width: 64px; }
.rfq-delivery input[type=date] { width: 140px; }
.rfq-note { display: block; margin: 12px 0; }
.rfq-note textarea { display: block; width: 100%; min-height: 60px; }
.rfq-error { color: #b42318; min-height: 20px; margin: 8px 0; }
.rfq-actions { display: flex; gap: 10px; }
.notice-success { border-color: #2e7d32; background: #edf7ee; color: #24572a; }
.rfq-lowest { background: #edf7ee; }
.rfq-badge { display: inline-block; padding: 0 6px; border-radius: 8px; background: #2e7d32; color: #fff; font-size: 12px; }
.rfq-cell small { display: block; color: #667; }
/* 询价单整页编辑：表头与报价单录入同样的 form-row，表格下方是供应商和保存栏 */
.rfq-e-head .rfq-e-title input { min-width: 360px; }
.rfq-e-head .rfq-e-check { flex-direction: row; align-items: center; align-self: flex-end; padding-bottom: 8px; }
.rfq-e-head .rfq-e-check input { min-width: 0; }
.rfq-e-head .rfq-e-wide { flex-basis: 100%; }
.rfq-e-head textarea { width: 100%; min-height: 56px; padding: 8px 10px; border: 1px solid #dcdde1; border-radius: 6px; font: inherit; }
.rfq-e-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.rfq-e-quick { justify-content: flex-start; }
.rfq-e-suppliers { width: 100%; }
.rfq-e-suppliers select, .rfq-e-suppliers input { width: 100%; min-width: 220px; }
.rfq-e-savebar { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.rfq-e-savebar .rfq-error { flex: 1; margin: 0; }
.rfq-link { word-break: break-all; user-select: all; padding: 8px; background: #f2f4f7; border: 1px solid #ccd; }
