:root {
  --ink: #12263a;
  --muted: #6b7c8c;
  --line: #dfe6ec;
  --paper: #ffffff;
  --canvas: #f3f6f8;
  --teal: #087f8c;
  --teal-soft: #e3f4f4;
  --amber: #b96d16;
  --amber-soft: #fff3df;
  --green: #18794e;
  --green-soft: #e4f6ec;
  --rose: #b7495e;
  --rose-soft: #fdebed;
  --shadow: 0 16px 45px rgba(23, 47, 67, 0.08);
}

* { box-sizing: border-box; letter-spacing: 0; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 4vw;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 2px 18px rgba(16, 34, 49, .16);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  color: var(--ink); background: #f8d27a; border-radius: 9px;
  font-family: "Segoe UI", sans-serif; font-weight: 700; font-size: 17px;
}
.brand-name { font-size: 16px; font-weight: 700; }
.brand-caption { margin-left: 7px; color: #92a4b4; font-size: 11px; font-weight: 500; }
.topnav { display: flex; align-items: center; gap: 5px; }
.nav-btn {
  border: 0; border-radius: 7px; padding: 9px 14px; color: #98aabd;
  background: transparent; font-size: 13px; font-weight: 700;
}
.nav-btn.active { color: #fff; background: rgba(255, 255, 255, .12); }
.profile { display: flex; align-items: center; gap: 10px; min-width: 210px; justify-content: flex-end; }
.profile-copy { text-align: right; }
.profile-name { font-size: 12px; font-weight: 700; }
.profile-role { color: #8da0b1; font-size: 11px; margin-top: 2px; }
.logout-link { margin-top: 2px; padding: 0; color: #8da0b1; border: 0; background: transparent; font-size: 10px; }
.logout-link:hover { color: #fff; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: #218b91; font-size: 13px; font-weight: 800; }

.login-page { display: grid; grid-template-columns: minmax(360px, 520px) 1fr; min-height: 100vh; background: var(--paper); }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 7vw, 88px); border-right: 1px solid var(--line); }
.login-brand { position: absolute; top: 38px; left: clamp(32px, 7vw, 88px); display: flex; align-items: center; gap: 11px; }
.login-brand > div:last-child { display: flex; flex-direction: column; }
.login-brand strong { color: var(--ink); font-size: 15px; }
.login-brand span { margin-top: 2px; color: #93a2ad; font-family: "Segoe UI", sans-serif; font-size: 10px; }
.login-copy h1 { font-size: 32px; }
.login-copy > p:last-child { margin: 12px 0 27px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 17px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: #f4f8f8; }
.auth-tab { padding: 9px 10px; border: 0; border-radius: 5px; color: #829198; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.auth-tab.active { color: var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(18,38,58,.08); }
.hidden { display: none !important; }
.login-button { width: 100%; margin-top: 14px; }
.login-error { min-height: 20px; margin-top: 9px; color: var(--rose); font-size: 11px; }
.login-security { display: flex; gap: 10px; margin-top: 18px; padding: 13px 14px; border: 1px solid #dbe8e4; border-radius: 7px; color: #789087; background: #f6fbf9; font-size: 11px; line-height: 1.55; }
.login-security > span { color: var(--green); font-weight: 800; }
.login-security b { display: block; color: #4f7164; }
.login-aside { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(40px, 8vw, 110px); color: #fff; background: #12263a; }
.login-aside h2 { max-width: 620px; font-size: 52px; line-height: 1.18; }
.login-aside .eyebrow { color: #72c7c5; }
.login-metrics { display: flex; gap: 10px; flex-wrap: wrap; }
.login-metrics span { padding: 9px 11px; color: #bfd0dc; border: 1px solid rgba(255,255,255,.16); border-radius: 5px; font-size: 11px; }

.main { width: min(1280px, 92vw); margin: 0 auto; padding: 38px 0 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 9px; color: var(--teal); font-family: "Segoe UI", sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { color: var(--ink); font-size: 34px; line-height: 1.25; }
.subhead { max-width: 590px; margin-top: 11px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 7px;
  font-size: 14px; font-weight: 700; line-height: 1; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .close-btn:focus-visible, .action-link:focus-visible, .nav-btn:focus-visible { outline: 3px solid rgba(8, 127, 140, .22); outline-offset: 2px; }
.button:active { transform: translateY(0); }
.button:disabled { cursor: wait; opacity: .72; transform: none; box-shadow: none; }
.button-primary { color: #fff; background: #087f8c; box-shadow: 0 7px 17px rgba(8,127,140,.2); }
.button-primary:hover { background: #066e78; box-shadow: 0 9px 20px rgba(8,127,140,.24); }
.button-quiet { color: var(--ink); background: var(--paper); border-color: var(--line); }
.button-quiet:hover { border-color: #b9c8d2; background: #fafeff; }
.button-success { color: #fff; background: var(--green); box-shadow: 0 7px 17px rgba(24,121,78,.2); }
.button-success:hover { background: #12673f; box-shadow: 0 9px 20px rgba(24,121,78,.24); }
.button-danger { color: var(--rose); border-color: #f2ccd3; background: var(--rose-soft); }
.button-danger:hover { border-color: #e8aeb9; background: #f9dce1; }
.button-danger-solid { color: #fff; background: #b63e54; box-shadow: 0 7px 17px rgba(183,73,94,.2); }
.button-danger-solid:hover { background: #9f3247; }
.button-confirm { min-width: 132px; }
.button-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: currentColor; background: rgba(255,255,255,.16); font-size: 11px; font-weight: 800; }
.button-small { min-height: 34px; padding: 0 11px; font-size: 12px; }
.button-spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.42); border-top-color: #fff; border-radius: 50%; animation: button-spin .7s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { display: flex; align-items: center; justify-content: space-between; min-height: 95px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-value { margin-top: 7px; color: var(--ink); font-family: "Segoe UI", sans-serif; font-size: 26px; line-height: 1; }
.stat-accent { width: 7px; height: 42px; border-radius: 9px; background: #c9d6df; }
.stat:nth-child(2) .stat-accent { background: #e0ad4d; }
.stat:nth-child(3) .stat-accent { background: #4aa99b; }
.stat:nth-child(4) .stat-accent { background: #68a877; }

.user-layout { display: grid; grid-template-columns: minmax(330px, .9fr) minmax(0, 1.45fr); gap: 20px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 16px; font-weight: 700; }
.panel-note { color: var(--muted); font-size: 12px; }
.form-body { padding: 21px 22px 23px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 13px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #465b6d; font-size: 13px; font-weight: 700; }
.field label span { color: var(--rose); }
.field input, .field select, .field textarea {
  width: 100%; color: var(--ink); border: 1px solid #d6e0e6; border-radius: 6px;
  outline: 0; background: #fbfcfd; transition: .15s ease;
}
.field input, .field select { height: 42px; padding: 0 12px; font-size: 14px; }
.field textarea { min-height: 82px; padding: 10px 12px; resize: vertical; font-size: 14px; line-height: 1.6; }
.field input[type="file"] { height: auto; min-height: 42px; padding: 5px; color: #71838f; font-size: 12px; }
.field input[type="file"]::file-selector-button { min-height: 30px; margin-right: 9px; padding: 0 11px; border: 0; border-radius: 5px; color: #23646b; background: var(--teal-soft); font: inherit; font-weight: 700; cursor: pointer; }
.field input[type="file"]::file-selector-button:hover { background: #d4ecec; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(8,127,140,.1); }
.field-hint { color: #81919d; font-size: 12px; line-height: 1.55; }
.privacy-block { margin-top: 19px; padding: 14px 14px 15px; border: 1px solid #dfe9e6; border-radius: 7px; background: #f7fbfa; }
.privacy-title { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: 13px; font-weight: 800; }
.privacy-title::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.privacy-copy { margin: 5px 0 14px 14px; color: #667f76; font-size: 12px; line-height: 1.6; }
.form-submit { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 21px; }
.secure-note { display: flex; align-items: center; gap: 5px; color: #8797a2; font-size: 11px; }
.secure-note b { color: var(--green); font-size: 14px; }

.records-panel { min-width: 0; }
.record-list { padding: 0 22px 4px; }
.record { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 15px; padding: 19px 0; border-bottom: 1px solid #edf1f3; }
.record:last-child { border-bottom: 0; }
.record-main { min-width: 0; }
.record-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.record-project { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; }
.record-id { color: #9aa8b3; font-family: "Segoe UI", sans-serif; font-size: 10px; }
.record-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; color: #6d7f8d; font-size: 12px; }
.record-meta strong { color: var(--ink); font-family: inherit; font-weight: 600; }
.record-note { margin-top: 8px; color: #71838f; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.classification-preview { min-height: 34px; padding: 9px 10px; color: #8a99a4; border: 1px dashed #cad7de; border-radius: 6px; background: #f8fafb; font-size: 11px; }
.classification { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.classification span, .classification strong { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 4px; color: #356c74; background: #e7f3f3; font-size: 11px; font-weight: 700; }
.classification span:nth-child(2) { color: #865d1f; background: #fff1d9; }
.classification span:nth-child(3) { color: #687985; background: #edf2f5; font-weight: 500; }
.classification strong { color: var(--green); background: var(--green-soft); font-family: "Segoe UI", sans-serif; }
.record-main > .classification { margin-top: 8px; }
.record-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.record-price { color: var(--ink); font-family: "Segoe UI", sans-serif; font-size: 17px; font-weight: 500; }
.status { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status.submitted { color: var(--amber); background: var(--amber-soft); }
.status.reviewing { color: var(--teal); background: var(--teal-soft); }
.status.need_info { color: #8a5a00; background: #fff0c2; }
.status.settled { color: var(--green); background: var(--green-soft); }
.status.rejected { color: var(--rose); background: var(--rose-soft); }
.empty { padding: 48px 24px; color: var(--muted); text-align: center; font-size: 13px; }
.empty strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 14px; }

.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.accounting-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 20px; padding: 18px 21px; border: 1px solid #d6e6e2; border-radius: 10px; background: #f7fbfa; }
.accounting-panel h2 { margin: 1px 0 5px; color: var(--ink); font-size: 16px; }
.accounting-panel p:not(.eyebrow) { color: #71848c; font-size: 12px; }
.accounting-numbers { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; color: #667983; font-size: 12px; }
.accounting-numbers b { margin-left: 4px; color: var(--ink); font-family: "Segoe UI", sans-serif; font-weight: 500; }
.accounting-actions { display: flex; align-items: center; gap: 8px; }
.allocation-summary { display: flex; align-items: flex-end; gap: 15px; flex-wrap: wrap; justify-content: flex-end; color: var(--green); font-family: "Segoe UI", sans-serif; font-size: 12px; text-align: right; }
.allocation-summary b { width: 100%; color: #83948f; font-family: inherit; font-size: 11px; font-weight: 500; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-date { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; }
.audit-list { display: grid; gap: 8px; max-height: 55vh; overflow: auto; }
.audit-item { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2, #faf8f3); }
.audit-item span { color: var(--muted); font-size: 12px; }
.audit-item code { color: var(--teal); font-size: 12px; }
@media (max-width: 700px) { .audit-item { grid-template-columns: 1fr; gap: 4px; } .filter-date { flex: 1 1 130px; } }
.search { width: 210px; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--paper); color: var(--ink); font-size: 12px; }
.search:focus { border-color: var(--teal); }
.filter-select { height: 36px; padding: 0 27px 0 10px; border: 1px solid var(--line); border-radius: 6px; outline: 0; color: var(--ink); background: var(--paper); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 1210px; }
.data-table th { padding: 13px 17px; color: #6f818d; background: #f9fbfc; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; text-align: left; }
.data-table th { white-space: nowrap; }
.data-table td { padding: 15px 17px; border-bottom: 1px solid #edf1f3; color: #465c6e; font-size: 13px; vertical-align: middle; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #fbfdfd; }
.ref-cell { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ref-main { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ref-text { color: var(--ink); font-weight: 700; }
.ref-flags { display: inline-flex; align-items: center; gap: 5px; }
.ref-flag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ref-flag.dup { color: #fff; background: var(--rose); }
.ref-flag.odd { color: var(--muted); background: #eef2f5; border: 1px solid var(--line); }
.ref-partner { margin-top: 4px; color: #b7495e; font-size: 11.5px; }
.ref-partner.paid { color: #8f2f42; font-weight: 700; }
.data-table tbody tr.row-dup > td { background: var(--rose-soft); }
.data-table tbody tr.row-dup:hover > td { background: #fbe0e3; }
.data-table tbody tr.row-dup > td:first-child { box-shadow: inset 3px 0 0 var(--rose); }
.data-table tbody tr.row-dup-cross > td:first-child { box-shadow: inset 3px 0 0 #8f2f42; }

/* 重复订单提醒条：只在真的有重复时出现 */
.dup-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 11px 14px; border: 1px solid #f0dcae; border-radius: 10px; background: var(--amber-soft); }
.dup-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.dup-text { flex: 1; min-width: 0; color: #7a4d0c; font-size: 13px; }
.dup-text b { color: #5f3a05; font-weight: 800; }
.copy-btn { flex: none; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 7px; padding: 3px 8px; font-size: 11.5px; line-height: 1.5; cursor: pointer; }
.copy-btn:hover { border-color: var(--teal); color: var(--teal); }
.copy-btn.copied { border-color: #b9e3cb; color: var(--green); background: var(--green-soft); }
.table-person { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 800; }
.mini-avatar { display: grid; place-items: center; width: 25px; height: 25px; color: #226c73; background: var(--teal-soft); border-radius: 50%; font-size: 10px; font-weight: 800; }
.money { color: var(--ink); font-family: "Segoe UI", sans-serif; font-size: 13px; }
.positive { color: var(--green) !important; }
.negative { color: var(--rose) !important; }
.table-actions { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.danger-link { color: var(--rose); }
.table-sub { color: #97a4ae; font-size: 10px; margin-top: 3px; }
.action-link { color: var(--teal); border: 0; padding: 0; background: transparent; font-size: 12px; font-weight: 800; }
.action-link:hover { text-decoration: underline; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(18, 38, 58, .48); backdrop-filter: blur(3px); }
.drawer-backdrop.open { display: flex; }
.drawer { width: min(760px, 100%); max-height: min(900px, 92vh); overflow-y: auto; background: var(--paper); border-radius: 12px; box-shadow: 0 28px 80px rgba(18,38,58,.3); animation: modal-in .2s ease-out; }
@keyframes modal-in { from { transform: translateY(12px) scale(.98); opacity: .55; } to { transform: translateY(0) scale(1); opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 25px 27px 19px; border-bottom: 1px solid var(--line); }
.drawer-kicker { color: var(--teal); font-family: "Segoe UI", sans-serif; font-size: 10px; }
.drawer-title { margin-top: 7px; font-size: 21px; }
.drawer-subtitle { margin-top: 7px; color: var(--muted); font-size: 13px; }
.close-btn { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: transparent; font-size: 18px; }
.drawer-body { padding: 22px 27px 30px; }
.drawer-loading { min-height: 240px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-weight: 700; }
.drawer-loading .button-spinner { border-color: rgba(17, 30, 52, .2); border-top-color: var(--ink); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.detail-item { min-width: 0; }
.detail-label { color: #748691; font-size: 12px; font-weight: 700; }
.detail-value { margin-top: 5px; color: var(--ink); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.private-detail { margin-top: 22px; padding: 16px; border: 1px solid #f0dfb9; border-radius: 7px; background: #fffaf0; }
.private-detail .detail-label { color: #a47737; }
.private-detail .detail-value { color: #67481d; }
.drawer-section-title { margin: 24px 0 13px; color: var(--ink); font-size: 14px; font-weight: 800; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.drawer-footer { display: flex; gap: 9px; margin-top: 25px; }
.site-footer { margin-top: 26px; padding: 14px 0 4px; text-align: center; color: #82919a; font-size: 12px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--teal); text-decoration: underline; }
.screenshot { display: block; width: 100%; max-height: 230px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #f6f8f9; }
.no-image { display: grid; place-items: center; min-height: 100px; color: #9aa8b3; border: 1px dashed #cfd9df; border-radius: 6px; font-size: 11px; }
.upload-preview { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px; border: 1px solid #d6e3e6; border-radius: 6px; color: #71838e; background: #f7fbfb; font-size: 11px; }
.upload-image { width: 88px; height: 56px; object-fit: cover; border-radius: 4px; border: 1px solid #c8d8dc; }
.upload-grid, .image-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.upload-grid.compact, .image-gallery.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.upload-tile { min-width: 0; padding: 5px; border: 1px solid #d6e3e6; border-radius: 6px; background: #f7fbfb; }
.upload-tile img, .image-gallery img { display: block; width: 100%; height: 88px; object-fit: cover; border-radius: 4px; background: #f1f4f5; }
.upload-tile span { display: block; overflow: hidden; margin-top: 5px; color: #71838e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.image-gallery img { height: 126px; object-fit: contain; border: 1px solid var(--line); cursor: zoom-in; }
.image-gallery.compact img { height: 92px; border-color: #eadfca; }
.image-preview-button { display: block; width: 100%; padding: 0; border: 0; border-radius: 5px; background: transparent; cursor: zoom-in; }
.image-preview-button:focus-visible { outline: 3px solid rgba(8,127,140,.28); outline-offset: 2px; }
.image-lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 28px; background: rgba(7, 17, 28, .88); backdrop-filter: blur(8px); }
.image-lightbox-stage { display: flex; max-width: min(1100px, 94vw); max-height: 92vh; align-items: center; flex-direction: column; gap: 10px; color: #fff; font-size: 12px; }
.image-lightbox-stage img { display: block; max-width: 100%; max-height: calc(92vh - 32px); object-fit: contain; border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.image-lightbox-close { position: fixed; top: 18px; right: 20px; z-index: 1; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: #fff; background: rgba(0,0,0,.28); font-size: 27px; line-height: 1; }
.image-lightbox-close:hover { background: rgba(255,255,255,.14); }
.settlement-permission { margin-top: 14px; padding: 10px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.settlement-permission.allowed { color: #12673f; background: #ebf8f1; border: 1px solid #bfe5cf; }
.settlement-permission.restricted { color: #89531d; background: #fff8e9; border: 1px solid #efd8aa; }
.button:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }
.saved-payment-gallery { margin-top: 8px; }
.saved-payment-gallery::before { content: "当前已保存"; grid-column: 1 / -1; color: #789087; font-size: 10px; font-weight: 700; }
.money-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-top: 22px; }
.money-strip.compact-money { grid-template-columns: repeat(3, minmax(0, 180px)); }
.money-strip > div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 7px; background: #f9fbfc; }
.money-strip span { display: block; color: var(--muted); font-size: 11px; }
.money-strip strong { display: block; margin-top: 6px; color: var(--ink); font-family: "Segoe UI", sans-serif; font-size: 17px; }
.money-strip .spread { border-color: #cce6d7; background: #f1fbf5; }
.money-strip .spread strong { color: var(--green); }
.spread-preview { margin-top: 15px; padding: 10px 12px; color: #687a85; border-radius: 6px; background: #f2f7f8; font-size: 12px; }
.spread-preview strong { color: var(--green); font-family: "Segoe UI", sans-serif; }
.spread-preview small { color: #9aa9ae; font-size: 10px; }
.field-optional { color: #a2adb2; font-size: 10px; font-style: normal; font-weight: 500; }
.allocation-backdrop { position: fixed; inset: 0; z-index: 35; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(18, 38, 58, .5); backdrop-filter: blur(3px); }
.allocation-window { width: min(760px, 100%); max-height: 90vh; overflow-y: auto; border-radius: 12px; background: var(--paper); box-shadow: 0 28px 80px rgba(18, 38, 58, .3); animation: modal-in .2s ease-out; }
.invites-window { width: min(820px, 100%); }
.invite-create { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; align-items: end; gap: 12px; padding: 15px; border: 1px solid #d6e6e2; border-radius: 8px; background: #f7fbfa; }
.invite-hint { margin: 12px 0 14px; color: #71838c; font-size: 12px; line-height: 1.6; }
.invite-summary { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin: 13px 0 0; padding: 10px 12px; color: #657984; border: 1px solid var(--line); border-radius: 7px; background: #f9fbfc; font-size: 12px; }
.invite-summary strong { color: var(--teal); font-family: "Segoe UI", sans-serif; font-size: 14px; }
.invite-summary b { margin-left: auto; color: #79908a; font-weight: 600; }
.invite-list { display: grid; gap: 9px; max-height: 430px; padding-right: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.invite-item { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto auto; align-items: center; gap: 13px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.invite-item.disabled { opacity: .58; }
.invite-person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.invite-person strong { display: block; color: var(--ink); font-size: 13px; }
.invite-person small { display: block; margin-top: 3px; color: #9aa8b3; font-size: 10px; }
.account-role { display: inline-flex; align-items: center; min-height: 19px; margin-left: 5px; padding: 0 5px; border-radius: 4px; color: #667984; background: #edf2f5; font-size: 9px; font-weight: 700; vertical-align: middle; }
.account-role.admin { color: #865d1f; background: #fff1d9; }
.invite-item code { padding: 5px 8px; color: #226c73; border-radius: 4px; background: var(--teal-soft); font-family: "Segoe UI", sans-serif; font-size: 12px; white-space: nowrap; }
.invite-state { color: var(--green); font-size: 11px; font-weight: 700; white-space: nowrap; }
.invite-item.disabled .invite-state { color: #9aa8b3; }
.invite-actions { display: flex; gap: 6px; }
.allocation-window-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 24px 27px 17px; border-bottom: 1px solid var(--line); }
.allocation-window-head h2 { margin-top: 6px; color: var(--ink); font-size: 22px; }
.allocation-window-body { padding: 22px 27px 28px; }
.allocation-total { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; padding: 15px 17px; border: 1px solid #d3e8db; border-radius: 8px; background: #f2fbf5; }
.allocation-total span { color: #6a8275; font-size: 12px; font-weight: 700; }
.allocation-total strong { color: var(--green); font-family: "Segoe UI", sans-serif; font-size: 24px; font-weight: 500; }
.allocation-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 19px; }
.allocation-step { min-height: 110px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.allocation-step span, .allocation-result span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.allocation-step strong { display: block; margin-top: 10px; color: var(--ink); font-family: "Segoe UI", sans-serif; font-size: 20px; font-weight: 500; }
.allocation-step small, .allocation-result small { display: block; margin-top: 7px; color: #98a5ac; font-size: 10px; line-height: 1.4; }
.allocation-step.mine { border-color: #cde2f1; background: #f5faff; }
.allocation-step.mine strong { color: #347a9d; }
.allocation-step.support { border-color: #e9d9ba; background: #fffaf1; }
.allocation-step.support strong { color: #a66b20; }
.allocation-arrow { color: #9aaab2; font-size: 20px; text-align: center; }
.allocation-result { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.allocation-result > div { padding: 15px; border-radius: 8px; background: #f8fafb; }
.allocation-result strong { display: block; margin-top: 8px; color: var(--green); font-family: "Segoe UI", sans-serif; font-size: 20px; font-weight: 500; }
.allocation-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: #8b999f; font-size: 11px; }
.detail-spacing { margin-top: 18px; }
.accounting-base, .accounting-live { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafb; }
.accounting-base span, .accounting-live span { color: var(--muted); font-size: 11px; font-weight: 700; }
.accounting-base strong, .accounting-live strong { color: var(--ink); font-family: "Segoe UI", sans-serif; font-size: 20px; font-weight: 500; }
.accounting-live { margin: 15px 0 0; border-color: #d5e6e1; background: #f4faf8; }
.accounting-live strong { color: var(--green); }
.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.qr-image { display: block; width: 100%; height: 110px; margin-top: 6px; object-fit: contain; border: 1px solid #eadfca; border-radius: 5px; background: #fff; }
.qr-empty { display: grid; place-items: center; height: 110px; margin-top: 6px; color: #af9e7b; border: 1px dashed #e6d4ae; border-radius: 5px; font-size: 11px; }
.confirm-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(18, 38, 58, .56); backdrop-filter: blur(4px); animation: confirm-fade .16s ease-out; }
.confirm-dialog { width: min(430px, 100%); padding: 28px; border-radius: 10px; background: var(--paper); box-shadow: 0 28px 80px rgba(18,38,58,.32); text-align: center; animation: modal-in .18s ease-out; }
.confirm-symbol { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 15px; border-radius: 50%; color: #fff; background: var(--green); font-size: 19px; font-weight: 800; }
.confirm-symbol.danger { background: var(--rose); }
.confirm-dialog h2 { color: var(--ink); font-size: 20px; line-height: 1.35; }
.confirm-dialog p { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 23px; }
@keyframes confirm-fade { from { opacity: 0; } to { opacity: 1; } }
.toast { position: fixed; right: 24px; bottom: 25px; z-index: 50; display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 48px); padding: 12px 15px; color: #fff; background: var(--ink); border-radius: 7px; box-shadow: 0 10px 30px rgba(18,38,58,.25); font-size: 12px; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.announcement { margin-top: 20px; padding: 17px 20px; border-left: 3px solid #e2b357; background: #fffaf0; color: #725a2e; font-size: 12px; line-height: 1.7; }
.announcement b { color: #594519; }

.stat-value, .record-id, .record-price, .money, .accounting-numbers b, .drawer-kicker,
.money-strip strong, .invite-summary strong, .invite-item code, .allocation-total strong,
.allocation-step strong, .allocation-result strong, .accounting-base strong, .accounting-live strong {
  font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

/* ---------- 订单来源自动对齐（金额 / 商品） ---------- */

.inline-input { display: flex; align-items: stretch; gap: 8px; }
.inline-input > input { flex: 1 1 auto; min-width: 0; }
.sync-btn {
  flex: none; align-self: stretch; white-space: nowrap;
  min-height: 44px; padding: 0 13px;
  color: var(--teal); border: 1px solid #bfe0e3; border-radius: 7px; background: var(--teal-soft);
  font-size: 12.5px; font-weight: 700;
}
.sync-btn:hover { border-color: var(--teal); background: #d5eeee; }
.sync-btn:disabled { cursor: wait; opacity: .6; }
.sync-hint {
  margin-top: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px;
  background: #f7fafb; color: var(--muted); font-size: 12px; line-height: 1.6;
}
.sync-hint b { color: var(--ink); }
.sync-hint.ok { color: #1d6a49; border-color: #bfe0cd; background: var(--green-soft); }
.sync-hint.ok b { color: #14603f; }
.sync-hint.warn { color: #8a5a11; border-color: #f0dcae; background: var(--amber-soft); }
.sync-hint.warn b { color: #7a4d0c; }
.sync-hint.loading { color: #6b7c8c; }
.sync-hint-sub { margin-top: 3px; font-size: 11.5px; opacity: .92; }

.auto-tag {
  margin-left: 4px; padding: 1px 6px; border-radius: 20px;
  color: var(--teal); background: var(--teal-soft);
  font-size: 10px; font-style: normal; font-weight: 700; vertical-align: 1px;
}

input.auto-filled { border-color: var(--teal); background: #eefbfb; box-shadow: 0 0 0 3px rgba(8, 127, 140, .14); }
input.auto-filled { transition: background .25s ease, box-shadow .25s ease; }

/* ---------- 结算完成的反馈条 ---------- */

.settled-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px; padding: 13px 15px;
  border: 1px solid #bfe0cd; border-radius: 10px; background: var(--green-soft);
}
.settled-banner-main { display: flex; align-items: center; gap: 11px; flex: 1 1 auto; min-width: 0; }
.settled-check {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  color: #fff; background: var(--green); font-size: 14px; font-weight: 800;
}
.settled-banner strong { display: block; color: #14603f; font-size: 13.5px; }
.settled-banner-sub { margin-top: 3px; color: #3f7a5d; font-size: 12px; }
.next-pending { flex: none; color: var(--ink); border-color: #bcd7c8; background: #fff; }
.next-pending:hover { border-color: var(--green); color: #14603f; background: #f6fdf9; }

/* 小节标题右侧挂动作按钮（如「复制打款信息」） */
.drawer-section-title.title-with-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- 列表：已结算沉底的分隔线 ---------- */

.data-table tr.group-divider { background: transparent; }
.data-table tr.group-divider:hover { background: transparent; }
.data-table tr.group-divider td {
  padding: 20px 12px 9px; border: 0; background: transparent;
  color: #94a6b1; font-size: 11.5px; font-weight: 700;
}
.data-table tr.group-divider td > span {
  display: flex; align-items: center; gap: 10px;
}
.data-table tr.group-divider td > span::before,
.data-table tr.group-divider td > span::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ---------- 批量结算结果弹窗 ---------- */

.settle-window { width: min(560px, 100%); }
.settle-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.settle-summary > div { padding: 13px 15px; border: 1px solid var(--line); border-radius: 9px; background: #f9fbfc; }
.settle-summary span { display: block; color: var(--muted); font-size: 11px; }
.settle-summary strong { display: block; margin-top: 5px; font-family: "Segoe UI", sans-serif; font-size: 22px; }
.settle-summary strong.ok { color: var(--green); }
.settle-summary strong.warn { color: var(--amber); }
.settle-skip-list { display: grid; gap: 9px; }
.settle-skip { padding: 12px 14px; border: 1px solid #f0dcae; border-radius: 9px; background: var(--amber-soft); }
.settle-skip-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.settle-skip-head strong { color: var(--ink); font-size: 13px; word-break: break-all; }
.settle-skip p { margin: 7px 0 0; color: #7a5a20; font-size: 12px; line-height: 1.6; }

/* ---------- 打款清单 ---------- */
.payout-window { width: min(640px, 100%); }
.payout-window .settle-summary { grid-template-columns: repeat(3, 1fr); }
.payout-window .settle-summary strong { font-size: 18px; }
.payout-alert { margin-top: 14px; padding: 10px 13px; border: 1px solid #f0dcae; border-radius: 9px; background: var(--amber-soft); color: #7a5a20; font-size: 12px; line-height: 1.6; }
.payout-table { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.payout-head, .payout-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.35fr) 58px 92px; gap: 10px; align-items: center; padding: 10px 14px; }
.payout-head { background: #f4f8fa; color: var(--muted); font-size: 11px; font-weight: 700; }
.payout-head span:nth-child(3), .payout-head span:nth-child(4) { text-align: right; }
.payout-list { max-height: 44vh; overflow-y: auto; }
.payout-row { border-top: 1px solid var(--line); font-size: 12.5px; }
.payout-row:first-child { border-top: 0; }
.payout-person { min-width: 0; }
.payout-person strong { display: block; color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payout-person small { display: block; margin-top: 3px; color: #8296a3; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payout-account { min-width: 0; }
.payout-account code { color: #2c3e50; font-size: 12px; word-break: break-all; }
.payout-flag { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid #f0dcae; background: var(--amber-soft); color: #7a4d0c; font-size: 11px; font-weight: 700; }
.payout-count { color: var(--muted); font-size: 12px; text-align: right; }
.payout-money { color: var(--ink); font-family: "Segoe UI", sans-serif; font-size: 14px; font-weight: 800; text-align: right; }
.payout-settle { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.payout-settle .button { min-height: 30px; padding: 0 12px; font-size: 12px; }
.payout-blocked { color: #8a5a11; font-size: 11.5px; line-height: 1.5; }
.payout-note { margin-top: 14px; color: #8296a3; font-size: 11.5px; line-height: 1.7; }
.payout-note b { color: var(--ink); }

/* ---------- 按接单人结算面板：明细 + 合计 + 收款码 ---------- */
.settle-panel { width: min(560px, 100%); }
.settle-panel-sub { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.settle-panel .settle-summary { grid-template-columns: 1fr 1fr; }
.settle-panel .drawer-section-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.settle-panel .section-hint { color: var(--muted); font-size: 11px; font-weight: 400; }
.settle-orders { display: grid; gap: 8px; margin-top: 10px; }
.settle-order { padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.settle-order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.settle-order-info { min-width: 0; }
.settle-order-project { color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.5; word-break: break-word; }
.settle-order-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.settle-order-money { flex: none; color: var(--ink); font-family: "Segoe UI", sans-serif; font-size: 14px; font-weight: 800; }
/* 订单号整块就是复制按钮：点一下即复制。反馈走伪元素，号码本身不会被替换成「已复制」 */
.copy-ref { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 8px; padding: 4px 9px; border: 1px dashed #cbd8de; border-radius: 6px; background: #f6fafb; color: #3f5c63; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.5; text-align: left; cursor: pointer; word-break: break-all; }
.copy-ref::after { content: "复制"; flex: none; color: var(--muted); font-family: "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 10.5px; }
.copy-ref:hover { border-color: var(--teal); color: var(--teal); }
.copy-ref:hover::after { color: var(--teal); }
.copy-ref.copied { border-style: solid; border-color: #b9e3cb; background: var(--green-soft); color: var(--green); }
.copy-ref.copied::after { content: "已复制"; color: var(--green); font-weight: 700; }
.copy-ref.blank { border-style: solid; border-color: var(--line); background: #fafcfd; color: #afbcc4; cursor: default; }
.copy-ref.blank::after { content: none; }
/* 收款码全部平铺，一张一张列出来，不做「只显示最新一张」这种猜测 */
.settle-qr-block { margin-top: 12px; }
.settle-qr-title { display: flex; align-items: baseline; gap: 7px; color: var(--ink); font-size: 12.5px; font-weight: 700; }
.settle-qr-title span { color: var(--muted); font-size: 11px; font-weight: 400; }
.settle-qr-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; margin-top: 9px; }
.settle-qr { padding: 7px; border: 1px solid #eadfca; border-radius: 8px; background: #fff; }
.settle-qr.wechat { border-color: #cfe3d4; }
.settle-qr.old { border-color: var(--line); background: #fbfcfd; }
.settle-qr img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 5px; }
.settle-qr-note { margin-top: 5px; color: var(--muted); font-size: 10.5px; text-align: center; word-break: break-all; }
.settle-payee { margin-top: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: #f9fbfc; color: #4b6570; font-size: 12px; line-height: 1.8; }
.settle-panel-warn { color: #a06a12; font-weight: 700; }
.settle-old { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.settle-old > summary { color: var(--muted); font-size: 11.5px; cursor: pointer; }
.settle-panel-footer { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.settle-method { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.settle-method > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.method-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.method-chip { padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: #5b7080; font-size: 12px; cursor: pointer; }
.method-chip:hover { border-color: var(--teal); color: var(--teal); }
.method-chip.active { border-color: var(--teal); background: var(--teal-soft); color: #0b6a75; font-weight: 700; }
.settle-panel-actions { display: flex; gap: 10px; margin-top: 15px; }
.settle-panel-actions .button { flex: 1; justify-content: center; }
.settle-panel-actions #confirm-settle { flex: 1.5; }

.link-block { margin-top: 20px; padding: 14px 15px; border: 1px solid #cfe3e6; border-radius: 8px; background: #f5fbfb; }
.link-block-head { display: flex; align-items: center; gap: 8px; color: #0b6a75; font-size: 12.5px; font-weight: 700; }
.link-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.link-badge { margin-left: auto; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.link-badge.ok { color: #14603f; background: var(--green-soft); }
.link-badge.warn { color: #7a4d0c; background: var(--amber-soft); }
.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 12px; }
.link-item span { display: block; color: #7c9199; font-size: 11px; }
.link-item strong { display: block; margin-top: 3px; color: var(--ink); font-size: 13px; font-weight: 700; word-break: break-word; }

@media (max-width: 560px) {
  .inline-input { flex-wrap: wrap; }
  .inline-input > input { flex: 1 1 100%; }
  .sync-btn { width: 100%; min-height: 40px; }
  .link-grid { grid-template-columns: 1fr; }
  .link-block-head { flex-wrap: wrap; }
  .link-badge { margin-left: 0; }
  /* 分隔线在手机端不能变成一张「空卡片」 */
  .data-table tr.group-divider { padding: 8px 0 2px; margin-bottom: 8px; border: 0; box-shadow: none; background: transparent; }
  .data-table tr.group-divider td[colspan] { padding: 0; }
  .settle-summary { grid-template-columns: 1fr 1fr; }
  /* 打款清单：表头隐藏，每行变成一张卡片 */
  .payout-window { width: 100%; }
  .payout-window .settle-summary { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .payout-window .settle-summary > div { padding: 10px 11px; }
  .payout-window .settle-summary strong { font-size: 15px; }
  .payout-head { display: none; }
  .payout-table { border: 0; border-radius: 0; overflow: visible; }
  .payout-list { max-height: 50vh; display: grid; gap: 9px; }
  .payout-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "person money" "account count"; gap: 5px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; }
  .payout-row:first-child { border-top: 1px solid var(--line); }
  .payout-person { grid-area: person; }
  .payout-money { grid-area: money; }
  .payout-account { grid-area: account; padding-top: 2px; }
  .payout-count { grid-area: count; padding-top: 2px; }
  .payout-settle { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
  .payout-settle .button { width: 100%; min-height: 34px; }
  /* 结算面板：确认按钮提到最上面，手指够得着；收款码两列，图更大好扫 */
  .settle-panel-actions { flex-direction: column; }
  .settle-panel-actions #confirm-settle { order: -1; min-height: 44px; }
  .settle-panel-actions .button { width: 100%; }
  .settle-qr-group { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .copy-ref { font-size: 11px; padding: 5px 9px; }
  .method-chip { padding: 6px 13px; }
}

@media (max-width: 930px) {
  .login-page { grid-template-columns: 1fr; }
  .login-panel { min-height: 100vh; border-right: 0; }
  .login-aside { display: none; }
  .topbar { padding: 0 22px; }
  .brand, .profile { min-width: auto; }
  .brand-caption { display: none; }
  .profile-copy { display: flex; align-items: flex-end; justify-content: center; }
  .profile-name { display: none; }
  .logout-link { display: inline-block; padding: 7px 0; color: #d7e3e8; font-size: 11px; line-height: 1; white-space: nowrap; }
  .main { width: min(94vw, 720px); padding-top: 28px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 17px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .user-layout { grid-template-columns: 1fr; }
  .form-body { padding-bottom: 21px; }
}
@media (max-width: 560px) {
  .login-panel { padding: 85px 24px 34px; }
  .login-brand { top: 24px; left: 24px; }
  .topbar { height: 64px; padding: 0 15px; }
  .topnav { gap: 1px; }
  .nav-btn { padding: 8px 9px; font-size: 11px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand-name { font-size: 13px; }
  h1 { font-size: 28px; }
  .main { width: calc(100vw - 28px); padding: 24px 0 50px; }
  .head-actions { width: 100%; }
  .head-actions .button { flex: 1; }
  .stats { gap: 8px; }
  .stat { min-height: 83px; padding: 14px; }
  .stat-value { font-size: 21px; }
  .stat-label { font-size: 11px; }
  .stat-accent { width: 5px; height: 31px; }
  .panel-head { padding: 16px; }
  .form-body { padding: 17px 16px; }
  .form-grid, .detail-grid, .admin-form-grid { grid-template-columns: 1fr; gap: 13px; }
  .field.full { grid-column: auto; }
  .form-submit { align-items: stretch; flex-direction: column; }
  .form-submit .button { width: 100%; }
  .record-list { padding: 0 16px; }
  .record { gap: 8px; }
  .record-meta { gap: 5px 10px; }
  .record-side { gap: 8px; }
  .record-price { font-size: 14px; }
  .admin-toolbar { align-items: stretch; flex-direction: column; }
  .filter-row { width: 100%; }
  .search { flex: 1; width: auto; }
  .filter-select { flex: 1; }
  .drawer-head, .drawer-body { padding-left: 18px; padding-right: 18px; }
  .drawer-footer { flex-direction: column; }
  .drawer-footer .button { width: 100%; }
  .drawer-backdrop { padding: 10px; }
  .accounting-panel { align-items: flex-start; flex-direction: column; gap: 15px; }
  .accounting-actions { width: 100%; }
  .accounting-actions .button { flex: 1; }
  .allocation-summary { justify-content: flex-start; text-align: left; }
  .money-strip { grid-template-columns: repeat(2, 1fr); }
  .upload-grid, .image-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-lightbox { padding: 12px; }
  .image-lightbox-close { top: 10px; right: 10px; }
  .allocation-backdrop { padding: 10px; }
  .allocation-window-head, .allocation-window-body { padding-left: 18px; padding-right: 18px; }
  .allocation-flow { grid-template-columns: 1fr; }
  .allocation-arrow { transform: rotate(90deg); }
  .allocation-result { grid-template-columns: 1fr; }
  .invite-create { grid-template-columns: 1fr; }
  .invite-summary b { width: 100%; margin-left: 0; }
  .invite-list { max-height: 52vh; }
  .invite-item { grid-template-columns: 1fr auto; gap: 9px; }
  .invite-item code { justify-self: start; }
  .invite-state { justify-self: end; }
  .invite-actions { grid-column: 1 / -1; }
  .invite-actions .button { flex: 1; }
  .confirm-dialog { padding: 24px 20px 20px; }
  .confirm-actions { grid-template-columns: 1fr; }

  .table-wrap { overflow: visible; }
  .data-table { display: block; min-width: 0; }
  .data-table thead { display: none; }
  .data-table tbody { display: block; }
  .data-table tr {
    display: flex; flex-wrap: wrap; align-items: center; gap: 9px 10px;
    padding: 13px 14px; margin-bottom: 11px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  }
  .data-table tbody tr:hover { background: var(--paper); }
  .data-table td { display: block; width: auto; padding: 0; border: 0; font-size: 13px; }
  .data-table td[colspan] { flex: 1 1 100%; }
  .c-person { order: 1; flex: 1 1 0; min-width: 0; }
  .c-status { order: 2; margin-left: auto; }
  .c-ref { order: 3; flex: 1 1 100%; padding-top: 4px; border-top: 1px solid var(--line); }
  .c-class { order: 4; flex: 0 0 auto; }
  .c-performer, .c-store, .c-profit { order: 5; flex: 1 1 28%; background: #f5f9fa; border-radius: 9px; padding: 8px 10px; text-align: center; }
  .c-performer::before, .c-store::before, .c-profit::before { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
  .c-performer::before { content: "打手"; }
  .c-store::before { content: "店内"; }
  .c-profit::before { content: "利润"; }
  .c-service, .c-time, .c-method { order: 6; flex: 0 0 auto; color: var(--muted); font-size: 12px; }
  .c-service::before { content: "客服 "; }
  .c-time::before { content: "接单 "; }
  .c-method::before { content: "结算 "; }
  .c-actions { order: 7; flex: 1 1 100%; }
  .c-actions .table-actions { width: 100%; gap: 9px; }
  .c-actions .action-link { flex: 1; padding: 9px; text-align: center; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfd; }
  .c-actions .action-link.danger-link { border-color: #f2ccd4; background: #fdf5f6; }
  /* 重复订单：手机端卡片布局下整张卡染色，内部格子保持透明，免得碎成一堆色块 */
  .data-table tbody tr.row-dup { background: var(--rose-soft); border-color: #f2ccd4; box-shadow: inset 3px 0 0 var(--rose); }
  .data-table tbody tr.row-dup:hover { background: var(--rose-soft); }
  .data-table tbody tr.row-dup > td { background: transparent; box-shadow: none; }
  .dup-banner { flex-wrap: wrap; }
  .dup-text { flex: 1 1 100%; }
  .dup-banner .button { flex: 1; }
}
