.wf-page { --wf-ink:#312528; --wf-muted:#63545a; --wf-paper:#fffaf4; --wf-line:#dfcfc1; --wf-rose:#f1dce0; --wf-dark:#713e4f; color:var(--wf-ink); }
.wf-page h1 { font-family:var(--font-display,serif);font-size:clamp(2rem,5vw,3.2rem);margin:0 0 .6rem; }
.wf-page h2 { font-size:clamp(1.15rem,3vw,1.55rem);line-height:1.3;margin:0 0 .7rem;overflow-wrap:anywhere; }
.wf-page [hidden],.sale-delivery-contact [hidden] { display:none !important; }
.wf-panel,.wf-todo { background:var(--wf-paper,#fffaf4);border:1px solid var(--wf-line,#dfcfc1);border-radius:14px;padding:clamp(.75rem,2.2vw,1.3rem);margin:.75rem 0; }
.wf-panel .wf-panel { background:#f7eee8; }
.wf-top,.wf-actions,.wf-fields,.wf-month-tools { display:flex;align-items:center;flex-wrap:wrap;gap:.55rem; }
.wf-actions>* { min-height:44px; }
.wf-top { justify-content:space-between; }
.wf-form { display:grid;gap:.75rem; max-width:54rem; }
.wf-form input:not([type=file]),.wf-form textarea,.wf-form select,.wf-panel textarea { width:100%; }
.wf-meta,.wf-row small,.wf-row time,.wf-status { color:var(--wf-muted); }
.wf-status { margin:.3rem 0;min-height:0; }
.wf-status:empty { display:none; }
.wf-status .btn { margin-left:.4rem; }
.wf-copy { white-space:pre-wrap;overflow-wrap:anywhere; }
.wf-row { color:inherit;text-decoration:none;display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:.75rem .85rem;background:var(--wf-paper);border:1px solid var(--wf-line);border-radius:12px;margin:.5rem 0;overflow-wrap:anywhere; }
.wf-row:hover,.wf-row:focus-visible { border-color:var(--wf-dark); }
.wf-row strong,.wf-row small,.wf-feed small { display:block; }
.wf-row small { margin-top:.25rem; }
.wf-kind { display:inline-block; padding:.2rem .45rem; margin:0 0 .3rem; border-radius:5px;background:hsl(calc(346 + var(--ticket-tone) * 28) 34% 91%); color:#33282a;font-size:.85rem;font-weight:700; }
.wf-row[data-unread=true],.wf-inbox-link.wf-unread { background:#f5e0e4; }
.wf-home-actions { display:flex;flex-wrap:wrap;align-items:flex-start;gap:.55rem;margin:.75rem 0; }
.wf-home-actions .wf-todo { flex:1 1 8rem;min-width:0;margin:0;padding:.65rem .8rem; }
.wf-home-actions .wf-todo summary { min-height:24px; }
.wf-home-actions .wf-home-inbox { display:inline-flex;align-items:center;gap:.35rem;min-height:46px;padding:.65rem .8rem;border:1px solid #cdb8aa;border-radius:12px;color:#653747;background:#fffaf4;font-size:1rem;font-weight:700;text-decoration:none;white-space:nowrap; }
.wf-home-actions .wf-home-inbox.wf-unread { background:#f5e0e4;border-color:#b67b8c; }
.wf-home-inbox:focus-visible { outline:2px solid #713e4f;outline-offset:2px; }
.wf-inbox-link span:first-child { font-size:1.35em;line-height:1;vertical-align:middle; }
.wf-unread-number { padding:0 .38rem;border-radius:.8rem;background:#79394f;color:white;margin-left:.22rem; }
.wf-inbox { animation:wf-reveal .14s ease-out; }
@keyframes wf-reveal { from { opacity:.6;transform:translateY(3px); } to { opacity:1;transform:none; } }
.wf-history summary,.wf-todo summary { cursor:pointer;font-weight:700;min-height:40px;line-height:1.4; }
.wf-history-categories { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr));gap:.65rem; }
.wf-history-tag { display:grid;justify-items:start;align-content:space-between;gap:.6rem;min-height:92px;padding:.8rem;border:1px solid #ccbcb4;border-radius:10px;background:hsl(calc(346 + var(--ticket-tone) * 28) 34% 91%);color:#382b30;font-size:1rem;text-align:left;cursor:pointer; }
.wf-history-tag strong { font-size:1.55rem;line-height:1; }
.wf-history-tag:focus-visible { outline:2px solid #713e4f;outline-offset:2px; }
.wf-history-detail h3 { margin:.85rem 0 .55rem; }
.wf-history-row { padding:.65rem 0;border-top:1px solid var(--wf-line); }
.wf-history-row summary small { margin-left:.5rem;color:var(--wf-muted); }
.wf-metrics { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.4rem; }
.wf-metrics>div { padding:.5rem;border-radius:.5rem;background:#f0e3da; }
.wf-metrics dd { margin:.2rem 0 0;font-size:clamp(.9rem,2.1vw,1.3rem);overflow-wrap:anywhere;font-weight:700; }
.wf-participant-picker { display:flex;align-items:end;flex-wrap:wrap;gap:.45rem; }
.wf-participant-picker .field { flex:1 1 13rem;min-width:0;margin:0; }
.wf-participant-picker select { width:100%;min-height:44px; }
.wf-participant-picker .btn { min-height:44px; }
.wf-feed,.wf-files { margin:.25rem 0;padding-left:1.2rem; }
.wf-feed>li,.wf-files>li { margin:.4rem 0;overflow-wrap:anywhere; }
.wf-files .btn { margin-left:.5rem;min-height:36px; }
.wf-proof,.wf-task-link { display:inline-block;font-weight:700;margin:.3rem .45rem .3rem 0;color:#713e4f; }
.wf-dialog { background:#fffaf4;color:#312528;padding:clamp(.9rem,4vw,1.5rem);border:1px solid #ceb9ad;border-radius:14px;width:min(92vw,32rem); }
.wf-dialog::backdrop { background:#2b20246b; }
.wf-calendar h2 { font-size:1.55rem; }
.wf-month-tools { justify-content:space-between;margin:.25rem 0 .6rem; }
.wf-month { font-size:1.2rem; }
.wf-calendar-grid { display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px; }
.wf-weekday { text-align:center;color:#5a4b51;font-size:.95rem; }
.wf-cal-day { min-height:55px;border:1px solid #dfcfc1;border-radius:.45rem;display:grid;align-content:center;gap:.1rem;text-align:center;background:#fffdf8;color:#312528;padding:.15rem .05rem;font-size:1.1rem;cursor:pointer; }
.wf-cal-day small { font-size:.74rem;color:#6c4351;min-height:1em; }
.wf-cal-day[aria-current=date] { box-shadow:inset 0 0 0 2px #b47c8d; }
.wf-cal-day[aria-pressed=true] { background:#713e4f;color:white; }
.wf-cal-day[aria-pressed=true] small { color:inherit; }
.wf-quick-days { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem;margin:.7rem 0; }
.wf-quick { min-height:66px;border:1px solid #dfcfc1;border-top:4px solid #a76e83;border-radius:.55rem;color:#312528;background:#f1dce0;display:grid;justify-items:center;align-content:center;gap:.1rem;font-size:1.06rem;cursor:pointer; }
.wf-quick:nth-child(2) { border-top-color:#bc8070;background:#f8e8dd; }
.wf-quick:nth-child(3) { border-top-color:#a88763;background:#f0e7d9; }
.wf-factory-search { display:flex;gap:.4rem;margin:.5rem 0; }.wf-factory-search input { min-width:0;flex:1; }
.wf-day-results { scroll-margin-top:6rem; }.wf-day-results>h2 { margin:.65rem 0; }
.wf-work-card { border:1px solid #dfcfc1;border-radius:12px;background:#fffaf4;padding:.7rem;margin:.55rem 0; }
.wf-work-card[data-urgent=true] { border:2px solid #a94456;background:#fff3ed; }
.wf-work-card>summary { cursor:pointer;list-style:none;display:grid;gap:.45rem; }
.wf-work-card>summary::-webkit-details-marker {display:none;}
.wf-card-date { color:#634b4b;font-weight:700;margin:0 0 .4rem; }
.wf-work-card[data-urgent=true] .wf-card-date { color:#8e2f40; }
.wf-factory-order-head,.wf-factory-order-meta { display:flex;align-items:center;justify-content:space-between;gap:.3rem .65rem;flex-wrap:wrap; }
.wf-factory-order-head>strong { font-size:clamp(1.3rem,5vw,1.65rem);line-height:1.23;overflow-wrap:anywhere; }
.wf-maker,.wf-production-status { background:#e3ecf4;color:#284a63;border-radius:6px;font-size:.95rem;padding:.23rem .45rem;font-weight:700;overflow-wrap:anywhere; }
.wf-production-status { background:#f4e2c9;color:#683e23; }
.wf-production-status[data-progress=已备好] { background:#ddeee5;color:#274f43; }
.wf-production-status[data-progress=已交付] { background:#e8e1ec;color:#493959; }
.wf-factory-order-meta { margin-top:.45rem; font-size:1.04rem; }
.wf-spec-peek,.wf-expand-spec { font-size:1rem;color:#684857; }
.wf-expand-spec { justify-self:end;font-weight:700; }
.wf-spec { display:grid;grid-template-columns:1fr auto;gap:.45rem;padding:.65rem 0;border-top:1px solid #dfcfc1;font-size:1.1rem;overflow-wrap:anywhere; }
.wf-spec span { grid-column:1/-1; }
.wf-ready-button { min-height:52px;width:100%;font-size:1.12rem; }
.wf-cancel,.wf-finance-note { background:#f4e0d9;color:#6b3b39;border-radius:.5rem;padding:.65rem; }
.wf-delivery-tabs { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
.wf-recipient { display:grid;gap:.3rem;font-style:normal;background:#f4e6e1;padding:.65rem;margin:.65rem 0;overflow-wrap:anywhere; }
.sale-delivery-contact { display:grid;gap:.6rem;grid-template-columns:repeat(2,minmax(0,1fr));margin:.75rem 0; }
.wf-print-label { color:#111;background:#fff;padding:.8rem;border:1px solid #bbb;max-width:32rem;overflow-wrap:anywhere; }
@media(max-width:650px) {
  .wf-factory-search { display:grid;grid-template-columns:minmax(0,1fr) auto; }
  .wf-month-tools .btn { padding-inline:.5rem; }.wf-month{font-size:1rem;}
  .wf-calendar-grid { gap:3px; }.wf-cal-day { min-height:46px; }
  .wf-fields>* { flex:1 0 min(100%,11rem); }
  .sale-delivery-contact {grid-template-columns:minmax(0,1fr);}
}
@media(prefers-reduced-motion:reduce) { .wf-inbox { animation:none; } }
@media print {
  body[data-route=delivery-label] * { visibility:hidden; }
  body[data-route=delivery-label] .wf-print-label,body[data-route=delivery-label] .wf-print-label * { visibility:visible; }
  body[data-route=delivery-label] .wf-print-label { position:absolute;top:0;left:0;margin:0;border:none; }
}

.wf-order-lookup,.wf-calendar>div:last-child { display:flex;align-items:end;gap:.45rem;flex-wrap:wrap; }
.wf-proof:has(img) { display:inline-grid;gap:.25rem;justify-items:center; }
.wf-proof img { object-fit:contain;background:#fff;border:1px solid #dfcfc1;border-radius:5px; }
.wf-page .btn,.wf-dialog .btn { min-height:44px; }
.wf-page .wf-ready-button { min-height:55px;font-weight:700; }
.wf-work-card[data-urgent=true] .wf-card-date { font-size:1.08rem; }
.wf-factory-search input {font-size:16px;}

/* 11 月 24 日五角色体验 */
.wf-overview-cards,.wf-manage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-block:1rem;}
.wf-overview-cards{grid-template-columns:repeat(3,minmax(0,1fr));}
.wf-overview-card{display:grid;gap:.4rem;text-decoration:none;color:var(--ink,#392b31);padding:1rem 1.15rem;border:1px solid #cfbfc0;border-radius:.85rem;background:#f2e0e4;min-height:4rem;}
.wf-overview-card strong{font-size:clamp(1.5rem,4vw,2rem);line-height:1.15;}
.wf-overview-card[aria-current="page"],.wf-scope-card[aria-current="page"]{box-shadow:inset 0 0 0 2px #744658;font-weight:700;}
.wf-overview-card[data-tone="waiting"],.wf-finance-gap[data-tone="sales"],.wf-message[data-tone="waiting"],.wf-scope-card[data-scope="mine"]{background:#f4e9d6;}
.wf-overview-card[data-tone="receipt"],.wf-finance-gap[data-tone="factory"],.wf-message[data-tone="assign"],.wf-scope-card[data-scope="joined"]{background:#e4ece9;}
.wf-delivery-home{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem 1rem;margin-block:.7rem;}
.wf-delivery-home span:last-child{margin-inline-start:auto;}
.wf-finance-gap{display:inline-block;border-radius:.45rem;padding:.25rem .4rem;color:#543348;}
.wf-message{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.45rem;margin-block:.6rem;padding:.35rem;border-radius:.75rem;background:#f3e3e8;}
.wf-message[data-tone="done"],.wf-scope-card[data-scope="closed"]{background:#e5ede3;}
.wf-message .wf-row{margin:0;background:transparent;}
.wf-scope-card{display:inline-flex;align-items:center;gap:.45rem;border:1px solid #d6c5c3;background:#f2dfe4;color:#4a3641;padding:.65rem .85rem;min-height:2.75rem;border-radius:.65rem;text-decoration:none;}
.wf-scope-card[data-scope="private"]{background:#eee5ed;}
.wf-scope-card .workspace-icon,.wf-manage-links .workspace-icon{width:1.2rem;height:1.2rem;}
.wf-scope-card svg,.wf-manage-links svg{width:1.2rem;height:1.2rem;}
.wf-ticket-timeline summary,.wf-ticket-original summary{cursor:pointer;font-weight:700;color:#653d49;}
.wf-form .wf-panel{margin:.25rem 0 .65rem;}
.wf-attachment input[hidden]{display:none;}
.wf-calendar-grid a.wf-cal-day{display:flex;flex-direction:column;text-decoration:none;}
.wf-cal-day[data-load],.wf-calendar-legend [data-load]{background:#fcfaf6;color:#543348;}
.wf-cal-day[data-load="light"],.wf-calendar-legend [data-load="light"]{background:#f4e4e3;}
.wf-cal-day[data-load="heavy"],.wf-calendar-legend [data-load="heavy"]{background:#e3bec8;}
.wf-cal-day[data-load][aria-current="date"]{outline:2px solid #805666;outline-offset:-2px;}
.wf-cal-day[data-load][aria-pressed="true"],.wf-cal-day[data-selected="true"]{box-shadow:inset 0 0 0 3px #543348;}
.wf-calendar-legend{display:flex;gap:.35rem;flex-wrap:wrap;margin-block:.5rem;}
.wf-calendar-legend span{border:1px solid #d4c3bc;padding:.2rem .45rem;border-radius:.4rem;font-size:.88rem;}
.wf-manage-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;}
.wf-manage-links a{display:flex;align-items:center;min-height:3rem;gap:.45rem;padding:.6rem;border-radius:.65rem;border:1px solid #ddcdc4;color:#523c45;text-decoration:none;background:#f5e6e7;}
.wf-manage-links[data-tone="production"] a{background:#e7eee9;}
.wf-manage-links[data-tone="people"] a{background:#f2e9dc;}
.wf-manage-links[data-tone="system"] a{background:#faf6ef;}
@media(max-width:640px){
  .wf-overview-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;}
  .wf-overview-cards [data-tone="receipt"]{grid-column:1/-1;}
  .wf-manage-grid{grid-template-columns:1fr;}
  .wf-cal-day[data-load]{min-height:3rem;}
  .wf-message{grid-template-columns:minmax(0,1fr);}
  .wf-message>.btn{justify-self:end;}
}

.yumao-v2 [data-record-choice="to_review"]{--record-wash:#ede4ee;--record-edge:#dacbdb;--record-ink:#674c69;}

/* 本人交货清单 */
.wf-delivery-view{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;max-width:28rem;}
.wf-delivery-view-link{display:grid;place-items:center;min-height:48px;padding:.45rem .55rem;border:1px solid #cdb8aa;border-radius:.6rem;background:#faf5ee;color:#543348;font-weight:650;text-align:center;text-decoration:none;}
.wf-delivery-view-link[aria-current=page]{border-color:#683f4e;background:#683f4e;color:#fffaf4;}
.wf-delivery-view-link:focus-visible{outline:2px solid #543348;outline-offset:2px;}
.wf-delivery-filters{margin:1rem 0 1.25rem;}
.wf-delivery-filter-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.55rem;margin-bottom:.65rem;}
.wf-delivery-filter-head h2{margin:0;font-size:1.1rem;}
.wf-delivery-stage-grid,.wf-delivery-date-grid{display:grid;gap:.55rem;}
.wf-delivery-stage-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr));}
.wf-delivery-date-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:.85rem;}
.wf-delivery-filter{display:flex;align-items:center;justify-content:space-between;gap:.35rem;width:100%;min-width:0;min-height:44px;padding:.5rem .7rem;border:1px solid var(--delivery-border,#dac8bd);border-radius:.6rem;background:var(--delivery-bg,#faf5ee);color:var(--delivery-ink,#543348);font:inherit;text-align:left;line-height:1.25;cursor:pointer;}
.wf-delivery-filter-head .wf-delivery-filter{width:auto;}
.wf-delivery-filter strong{white-space:nowrap;font-variant-numeric:tabular-nums;}
.wf-delivery-stage-grid .wf-delivery-filter{align-items:flex-start;flex-direction:column;justify-content:center;min-height:4.25rem;padding:.55rem .75rem;font-weight:650;}
.wf-delivery-stage-grid strong{font-size:1.15rem;}
.wf-delivery-filter[aria-pressed=true]{box-shadow:inset 0 0 0 2px currentColor;background:var(--delivery-active,#f0e2da);}
.wf-delivery-filter:focus-visible{outline:2px solid #543348;outline-offset:2px;}
.wf-delivery-filter[data-value=mine],.wf-delivery-state[data-value=mine]{--delivery-bg:#f5e7cd;--delivery-active:#f0deb9;--delivery-border:#cfad76;--delivery-ink:#684411;}
.wf-delivery-filter[data-value=review],.wf-delivery-state[data-value=review]{--delivery-bg:#efe3ed;--delivery-active:#e9d7e8;--delivery-border:#c6a6c1;--delivery-ink:#663657;}
.wf-delivery-filter[data-value=factory],.wf-delivery-state[data-value=factory]{--delivery-bg:#e3ecee;--delivery-active:#d5e5ea;--delivery-border:#a3bbc2;--delivery-ink:#2c505d;}
.wf-delivery-filter[data-value=ready],.wf-delivery-state[data-value=ready]{--delivery-bg:#e4eddf;--delivery-active:#d7e6d1;--delivery-border:#a7bea2;--delivery-ink:#365538;}
.wf-delivery-date-grid .wf-delivery-filter{flex-wrap:wrap;justify-content:center;text-align:center;font-size:.88rem;}
.wf-delivery-result{margin-block:.8rem .45rem;color:#604c55;}
.wf-delivery-order{display:grid;grid-template-columns:minmax(0,1fr) minmax(11rem,34%);align-items:start;}
.wf-delivery-order-progress{justify-items:start;}
.wf-delivery-order .wf-delivery-state{display:inline-block;width:fit-content;border-radius:.4rem;padding:.25rem .42rem;background:var(--delivery-bg,#f0e5dc);color:var(--delivery-ink,#543348);font-size:.86rem;}
.wf-delivery-order [data-due=overdue]{color:#803c46;}
@media(max-width:640px){
  .wf-delivery-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .wf-delivery-order{grid-template-columns:minmax(0,1fr);gap:.55rem;}
}
@media(forced-colors:active){
  .wf-delivery-filter[aria-pressed=true]{border:3px solid Highlight;}
}

/* 业务员单据记录与交货视图 */
.order-view-link{display:inline-flex;align-items:center;min-height:44px;color:#683f4e;text-underline-offset:.2em;}
.order-view-link:focus-visible{outline:2px solid #543348;outline-offset:2px;}
.yumao-v2 .record-task-grid-v3{grid-template-columns:repeat(4,minmax(0,1fr));}
.yumao-v2 .record-task-grid-v3 [data-record-choice=to_collect]{--record-wash:#f5e7cd;--record-edge:#cfad76;--record-ink:#684411;}
.yumao-v2 .record-task-grid-v3 [data-record-choice=to_review]{--record-wash:#efe3ed;--record-edge:#c6a6c1;--record-ink:#663657;}
.yumao-v2 .record-task-grid-v3 [data-record-choice=to_prepare]{--record-wash:#e3ecee;--record-edge:#a3bbc2;--record-ink:#2c505d;}
.yumao-v2 .record-task-grid-v3 [data-record-choice=to_dispatch]{--record-wash:#e4eddf;--record-edge:#a7bea2;--record-ink:#365538;}
.v7-record-finance{padding:.65rem .75rem;border-radius:.55rem;background:#efe3ed;color:#663657;}
.v7-record-finance p{margin:.2rem 0 0;}
@media(max-width:640px){
  body.yumao-v2 .record-task-grid-v3{grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;}
  body.yumao-v2 .record-task-grid-v3 [data-record-choice]{grid-template-columns:minmax(0,1fr);align-content:start;}
}
