/* Use existing pages and progressive disclosure. Scope all overrides to current workspaces. */
body.v5-shell {--polish-paper:#fffaf2;--polish-line:#daccbe;--polish-rose:#f0dedb;--polish-ink:#49383c}
body.v5-shell .v5-workspace .v5-workspace-panel{border:1px solid var(--polish-line);border-radius:12px;background:var(--polish-paper);min-width:0}
body.v5-shell .v5-workspace .v5-workspace-panel.cash5,
body.v5-shell .v5-workspace .v5-sales-summary{background:var(--polish-rose)}
body.v5-shell .v5-workspace .v5-workspace-grid{align-items:start;gap:16px}
body.v5-shell .v5-workspace .v5-line:focus-visible,body.v5-shell .v5-workspace button:focus-visible,.rose-board button:focus-visible{outline:2px solid #8b5362;outline-offset:2px}
body.v5-shell .v5-workspace .v5-line,body.v5-shell .v5-workspace .v5-detail-actions{min-width:0;overflow-wrap:anywhere}
body.v5-shell .v5-workspace .v5-line-end{font-variant-numeric:tabular-nums}
body.v5-shell .v5-workspace .v5-queue-tiles button[aria-pressed=true]{box-shadow:inset 0 -3px #af7380}
body.v5-shell .v5-workspace .v5-record-tools summary,body.v5-shell .v5-workspace .record-task-panel summary{cursor:pointer;min-height:36px;align-content:center;list-style:none}
body.v5-shell .v5-workspace .v5-record-tools summary::after,body.v5-shell .v5-workspace .record-task-panel summary::after{content:"⌄";margin-inline-start:8px}
body.v5-shell .v5-workspace .record-scope[aria-label="单据范围"]{margin:12px 0}
body.v5-shell .v5-workspace .record-categories>.record-scope:first-of-type,
body.v5-shell .v5-workspace .record-categories>.record-scope.v7-main-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;width:min(680px,100%);border-bottom:1px solid #cdbbaa}
body.v5-shell .v5-workspace .record-categories .v7-main-tabs button{border:0;border-radius:8px 8px 0 0;background:transparent;min-height:48px;font-size:16px;color:var(--polish-ink)}
body.v5-shell .v5-workspace .record-categories .v7-main-tabs button[aria-pressed=true]{box-shadow:inset 0 -3px #a96c79;background:var(--polish-rose);font-weight:700}
body.v5-shell .page-records .rec-list-block{padding-inline:0;border:0;background:transparent}
body.v5-shell .page-records .rec-list-title{margin-bottom:4px}
body.v5-shell .page-records .rec-cards{display:grid;gap:9px;margin-block:14px}
body.v5-shell .page-records .v7-record-date{font-size:14px;font-weight:650;color:#685348;margin:12px 0 0}
body.v5-shell .v5-workspace .receipt-card-group{--edge:#a59a8e;--badge:#eee7dd;margin:0;padding:0;border:1px solid #ded0c3;border-inline-start:4px solid var(--edge);background:var(--polish-paper);border-radius:10px;display:flex;align-items:center;gap:10px;min-width:0}
body.v5-shell .v5-workspace .receipt-card-group[data-tone=done]{--edge:#86a698;--badge:#ddebe3}
body.v5-shell .v5-workspace .receipt-card-group[data-tone=wait]{--edge:#bb925f;--badge:#f1e1cc}
body.v5-shell .v5-workspace .receipt-card-group[data-tone=make]{--edge:#9f8aaf;--badge:#eee4f1}
body.v5-shell .v5-workspace .receipt-card-group[data-tone=ship]{--edge:#b87586;--badge:#f1dfe3}
body.v5-shell .v5-workspace .receipt-card-group .rec-card{width:auto;flex:1;min-width:0;padding:12px 14px;border:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,auto);gap:12px;text-decoration:none}
body.v5-shell .v5-workspace .receipt-card-group .v5-line-end{display:grid;grid-template-columns:minmax(125px,auto) minmax(95px,auto);align-items:center;justify-content:end;gap:5px 12px;text-align:right}
body.v5-shell .v5-workspace .receipt-card-group .v5-line-end .v7-record-money{font-size:16px;color:#49333b;font-weight:700;white-space:nowrap}
body.v5-shell .v5-workspace .receipt-card-group .v5-line-end .v7-record-money small{display:block;font-size:11px;font-weight:500;color:#6e5045}
body.v5-shell .v5-workspace .receipt-card-group .v5-line-end>.tag{grid-column:1/-1;justify-self:end}
body.v5-shell .v5-workspace .receipt-card-group .v7-operate{margin-inline-end:11px;min-height:38px;white-space:nowrap;background:#f1e8dd;color:#634854;border:1px solid #d5c5b8}
.v7-record-detail .v5-detail-actions{margin-top:10px}
.v7-activity{margin:14px 0;padding:9px 14px;border:1px solid #dacabe;border-radius:11px;background:#f4eae1}
.v7-activity>summary{min-height:44px;align-content:center;cursor:pointer;font-weight:650}
.v7-activity .activity-head{display:none}
.v7-hero-stack{position:relative;min-width:0}
.v7-day-switch{grid-column:1/-1;position:relative;display:grid;grid-template-columns:repeat(3,1fr);width:min(330px,100%);margin:12px 14px 2px;background:#e9d8d4;border-radius:24px;isolation:isolate}
.v7-day-switch::before{content:"";position:absolute;inset:3px auto 3px 3px;width:calc((100% - 6px)/3);transform:translateX(calc(var(--day,0)*100%));background:#fcf4ee;border-radius:22px;z-index:-1}
.rose-board .v7-day-switch button{min-height:44px;color:#644651;font-weight:600}
.rose-board .v7-day-switch button[aria-pressed=true]{color:#4e2c39;font-weight:750}
.v7-hero-stack .rb-metrics[aria-busy=true]{opacity:.72}
.v7-local-error{min-height:1em;color:#7e343d;padding-inline:15px}
.v7-local-error:empty{display:none}
.rose-board .rb-chart-plot,.v7-hero-stack{touch-action:pan-y}
.rose-board .v7-business-grid{grid-template-columns:minmax(0,1.8fr) minmax(240px,1fr)}
.rose-board .v7-business-grid>:first-child{grid-column:1/-1}
.rose-board .v7-library-link{display:flex;min-height:54px;align-items:center;justify-content:space-between;padding:10px 14px;border:1px solid #d0b5b3;border-radius:8px;background:#f1e0de;color:#623b48;text-decoration:none;font-weight:650}
@media(max-width:700px){
  body.v5-shell .v5-workspace .receipt-card-group .rec-card{grid-template-columns:minmax(0,1fr);padding:10px;gap:7px}
  body.v5-shell .v5-workspace .receipt-card-group .v5-line-end{justify-content:space-between;text-align:left;grid-template-columns:minmax(0,1fr) auto}
  body.v5-shell .v5-workspace .receipt-card-group .v5-line-end .v7-record-money{text-align:right}
  body.v5-shell .v5-workspace .receipt-card-group .v7-operate{min-height:44px;margin-inline-end:7px}
  body.v5-shell .page-records input[type=search],body.v5-shell .page-sales input:not([type=checkbox]),body.v5-shell .page-sales select{font-size:16px}
  .v7-day-switch{width:min(310px,calc(100% - 28px))}
  .rose-board .v7-business-grid{grid-template-columns:minmax(0,1fr)}
}
@media(prefers-reduced-motion:no-preference){
  .v7-day-switch::before{transition:transform 160ms ease-out}
  body.v5-shell .v5-workspace .v7-operate,.rose-board .v7-library-link{transition:background-color 130ms}
  body.v5-shell .v5-workspace .v7-operate:hover,.rose-board .v7-library-link:hover{background:#e9d6d1}
}
@media(prefers-reduced-motion:reduce){.v7-day-switch::before{transition:none}}

body.v5-shell .page-payments .pay-sum{border:1px solid #d8c5b9;border-radius:12px;background:#f1e2df;padding:12px 16px}
body.v5-shell .page-payments .pay-list{display:grid;gap:8px}
body.v5-shell .page-payments .pay-card{border:1px solid #ded0c3;border-radius:9px;background:#fffaf2;padding:10px 13px;min-height:58px}
body.v5-shell .page-payments .pay-amt{font-variant-numeric:tabular-nums;color:#28574c}
body.v5-shell .page-payments .pay-amt.is-refund{color:#8e444c}
.pay-v7-basis{color:#66564f;font-size:13px}
body.v5-shell .v5-workspace .record-categories .v7-main-tabs button.btn[aria-pressed=true]{color:#603d4b}
.rose-board .v7-day-switch button[aria-pressed]{background:transparent;border:0;box-shadow:none}
.rose-board .v7-day-switch button[aria-pressed=true]{color:#502e3a}
body.v5-shell .v5-personal .v5-workspace-panel.v5-personal-rose{background:#f0dedb}
body.v5-shell .floor-v12 .v5-queue-list button.v5-line[aria-pressed=true]{background:#f1e0db;box-shadow:inset 3px 0 #a76877}
body.v5-shell .page-sales .v5-order-fields .items-box .tr:not(.h){border-inline-start:3px solid #b7838a;border-radius:10px}
body.v5-shell :is(.page-products,.page-customers,.page-settings,.v5-management) .v5-workspace-panel .v5-line{padding-block:10px}
@media(prefers-reduced-motion:no-preference){
  body.v5-shell .v5-workspace .v5-line[aria-pressed],body.v5-shell .v5-workspace .v7-main-tabs button{transition:background-color 130ms ease-out,box-shadow 130ms ease-out}
  body.v5-shell .v5-detail-drawer[open]{animation:v7-sheet-enter 150ms ease-out}
  @keyframes v7-sheet-enter{from{opacity:.65;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
}
.rose-board .v7-hero-stack{border:1px solid #d9c8c0;border-radius:13px;background:#f3e8e2}
.rose-board .v7-hero-stack .rb-metrics{border:0;border-radius:0 0 13px 13px}
.rose-board .v7-hero-stack .rb-cover{border-start-start-radius:0}
.rose-board .v7-hero-stack .rb-receipt{border-start-end-radius:0}

body.v5-shell .v5-workspace .v7-card-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px;padding:6px 10px}
body.v5-shell .v5-workspace .v7-card-actions .v7-operate{margin:0}
@media(max-width:700px){
  body.v5-shell .v5-workspace .receipt-card-group{flex-wrap:wrap;gap:0}
  body.v5-shell .v5-workspace .receipt-card-group .rec-card{flex:1 0 100%}
  body.v5-shell .v5-workspace .v7-card-actions{width:100%;border-top:1px solid var(--polish-line)}
}

body.v5-shell .page-payments .pay-card-body,
body.v5-shell .page-payments .pay-list,
body.v5-shell .page-payments .pay-card{min-width:0}
body.v5-shell .page-payments .table-wrap{max-width:100%;overflow-x:auto}
@media(max-width:420px){
  body.v5-shell .page-payments .pay-seg{display:flex;flex-wrap:wrap;max-width:100%}
  body.v5-shell .page-payments .pay-seg .seg-btn{flex:1 0 28%;min-width:0}
}

/* 单据导航：每个范围有固定色相，选中由短边和字重共同标出。 */
body.v5-shell .v5-workspace .record-categories>.v7-main-tabs{
  gap:8px;border:0;width:min(660px,100%);margin:12px 0 17px;
}
body.v5-shell .v5-workspace .record-categories .v7-main-tabs button.btn{
  display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:7px;
  border:1px solid var(--scope-border);border-radius:9px;background:var(--scope-bg);color:var(--scope-ink);box-shadow:none;
}
.v7-main-tabs button[data-record-choice=open]{--scope-bg:#f4eadc;--scope-border:#d8bf9f;--scope-ink:#674728;--scope-edge:#aa7840}
.v7-main-tabs button[data-record-choice=closed]{--scope-bg:#e6eee7;--scope-border:#b8cabd;--scope-ink:#31584a;--scope-edge:#648d79}
.v7-main-tabs button[data-record-choice=all]{--scope-bg:#ece7ef;--scope-border:#cdbed4;--scope-ink:#57435e;--scope-edge:#8a7495}
body.v5-shell .v5-workspace .record-categories .v7-main-tabs button.btn[aria-pressed=true]{
  color:var(--scope-ink);background:var(--scope-bg);border-color:var(--scope-edge);
  box-shadow:inset 0 -3px var(--scope-edge);font-weight:750;
}
.v7-main-tabs button::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--scope-edge);flex:none}
body.v5-shell .v5-workspace .receipt-card-group .v7-operate{
  padding:0 10px;border-color:#d6c9bf;border-radius:8px;background:#f5eee4;color:#624b53;
  font-size:13px;text-decoration:none;min-width:58px;
}
body.v5-shell .v5-workspace .receipt-card-group .v7-operate::after{
  content:"";display:inline-block;width:5px;height:5px;margin:0 0 3px 6px;
  border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);
}
body.v5-shell .v5-workspace .receipt-card-group .v7-operate:hover{background:#eee1d8}
body.v5-shell .invoice-recorded.tag{background:#e7eee7;color:#315846;border:1px solid #abc4b4;font-weight:650}
.v5-detail-drawer .record-document-actions,.v5-detail-drawer .record-invoice-slot{margin-top:12px}
body.v5-shell .v5-detail-drawer .record-receipt-save.receipt-action,
body.v5-shell .v5-detail-drawer .record-invoice-mark.btn{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:7px 13px;
  text-decoration:none;border-radius:8px;font-size:14px;font-weight:620;
}
body.v5-shell .v5-detail-drawer .record-receipt-save.receipt-action{background:#f2ede4;border-color:#cfc0ae;color:#554339}
body.v5-shell .v5-detail-drawer .record-invoice-mark.btn{background:#e8efea;border-color:#acbeb1;color:#305446}
.record-invoice-slot:has(.record-invoice-buttons){border:1px solid #d8c5b6;background:#f5ebe0;padding:10px 13px;border-radius:9px}
.record-invoice-slot p{margin:0 0 6px}
.record-invoice-buttons{display:flex;gap:8px;flex-wrap:wrap}
.record-invoice-feedback{color:#823e48}.record-invoice-feedback:empty{display:none}
@media(max-width:640px){
  body.v5-shell .v5-workspace .record-categories .v7-main-tabs button.btn{font-size:14px;gap:6px;min-height:48px}
}


body.v5-shell .page-records .record-invoice-inline{display:grid;gap:3px;align-items:center}
body.v5-shell .page-records .record-invoice-mark.btn{
  min-height:42px;padding:6px 10px;white-space:nowrap;border-radius:8px;
  border:1px solid #b0c3b4;background:#e8efe9;color:#325548;font-size:13px;font-weight:650;
}
body.v5-shell .page-records .record-invoice-mark.btn:hover{background:#dce9df}
body.v5-shell .page-records .record-invoice-mark.btn:disabled{opacity:.7}
body.v5-shell .page-records .record-invoice-inline .record-invoice-feedback{
  max-width:155px;margin:0;font-size:12px;line-height:1.45;white-space:normal;
}
body.v5-shell .page-records .record-invoice-inline .invoice-recorded{justify-self:start;white-space:nowrap}
@media(max-width:640px){body.v5-shell .page-records .record-invoice-mark.btn{min-height:44px}}
