/* R6.17.7.10 Product → Order Continuity Closure */
/* Product detail: one action bar + compact status, not a second dashboard. */
.r617710-primary-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.r617710-primary-actions .btn{min-height:38px}
.r617710-primary-actions .r617710-order-draft-action{border-color:#c7d2fe;background:#f8faff;color:#3f46c8;font-weight:700}
.r617710-readiness-compact{padding:10px 14px!important;border-radius:14px!important;min-height:0!important;display:block!important}
.r617710-readiness-compact.attention{border:1px solid #f2c58a!important;background:#fffbf4!important}
.r617710-readiness-compact.is-ready{border:1px solid #bde7cd!important;background:#f7fff9!important}
.r617710-readiness-main{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:58px}
.r617710-readiness-main>div:first-child{display:grid;grid-template-columns:auto 1fr;column-gap:10px;row-gap:2px;align-items:center;min-width:0}
.r617710-readiness-main small{font-size:11px;color:var(--fp-muted,#667085);font-weight:700}
.r617710-readiness-main strong{font-size:16px;color:var(--fp-text,#111827)}
.r617710-readiness-main span{grid-column:1/-1;color:var(--fp-muted,#667085);font-size:12px;line-height:1.45}
.r617710-readiness-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.r617710-readiness-more{position:relative}
.r617710-readiness-more>summary{list-style:none;cursor:pointer;border:1px solid var(--fp-border,#e5e7eb);border-radius:9px;background:#fff;padding:8px 11px;font-size:12px;font-weight:700;white-space:nowrap}
.r617710-readiness-more>summary::-webkit-details-marker{display:none}
.r617710-readiness-more[open]{position:absolute;right:14px;top:calc(100% + 6px);z-index:40;width:min(920px,calc(100vw - 80px));padding:12px;border:1px solid var(--fp-border,#e5e7eb);border-radius:14px;background:#fff;box-shadow:0 18px 50px rgba(15,23,42,.16)}
.r617710-readiness-more[open]>summary{margin-bottom:10px;background:var(--fp-surface-2,#f8fafc)}
.r617710-production-hold{border-color:#fed7aa!important;background:#fffaf5!important;color:#7c2d12!important}

/* Order page: four visible stages, only core fields stay open. */
.r617710-order-entry{gap:10px!important}
.r617710-order-section,.r617710-order-products{border-radius:14px!important}
.r617710-order-stage{display:flex;align-items:baseline;gap:10px;margin:0 0 10px;padding:0 2px}
.r617710-order-stage b{font-size:15px;color:#111827}
.r617710-order-stage span{font-size:11px;color:var(--fp-muted,#667085)}
.r617710-order-stage.minor{margin:0 0 8px;padding:0}
.r617710-order-stage.minor b{font-size:13px}
.r617710-order-core{display:grid;grid-template-columns:minmax(300px,1.7fr) minmax(180px,.75fr) minmax(180px,.7fr) minmax(170px,.65fr);gap:10px;align-items:end}
.r617710-order-core .order-field-wide{grid-column:auto!important}
.r617710-order-core .order-field{min-width:0}
.r617710-order-more{margin-top:10px;border-top:1px solid var(--fp-border,#e5e7eb)}
.r617710-order-more>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 2px 2px;cursor:pointer;list-style:none}
.r617710-order-more>summary::-webkit-details-marker{display:none}
.r617710-order-more>summary span{display:flex;align-items:baseline;gap:9px}
.r617710-order-more>summary b{font-size:12px}
.r617710-order-more>summary small{font-size:10px;color:var(--fp-muted,#667085)}
.r617710-order-more>summary em{font-style:normal;color:#5658d8;font-size:11px;font-weight:700}
.r617710-order-more[open]>summary em{font-size:0}
.r617710-order-more[open]>summary em:after{content:'收起';font-size:11px}
.r617710-order-more-body{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:12px;padding-top:10px}
.r617710-order-secondary{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
.r617710-order-secondary .order-field-wide{grid-column:1/-1!important}
.r617710-order-more .order-payment-panel{display:grid;gap:10px;padding:12px!important;border:1px solid var(--fp-border,#e5e7eb)!important;border-radius:12px!important;background:var(--fp-surface-2,#f8fafc)!important}
.r617710-order-more .order-attachment-box{padding:10px!important;background:#fff!important}
.r617710-order-entry .r6171-company-sheet{margin-top:0!important}

/* Order type is a compact context selector, not a second large form section. */
.r617710-order-entry .r61686-order-kind{padding:8px 10px!important}
.r617710-order-entry .r61686-order-kind .section-heading{display:none!important}
.r617710-order-entry .r61686-order-kind .order-kind-grid{display:flex!important;gap:6px!important;flex-wrap:wrap}
.r617710-order-entry .r61686-order-kind .order-kind-card{min-height:34px!important;padding:6px 10px!important;border-radius:999px!important;display:flex!important;align-items:center!important;gap:6px!important;width:auto!important}
.r617710-order-entry .r61686-order-kind .order-kind-card span{display:none!important}
.r617710-order-entry .scenario-focus-bar{padding:8px 12px!important}

/* Product lines: product + quantity + price dominate, packaging becomes a summary/disclosure. */
.r617710-order-products>.section-heading{margin-top:0!important}
.r617710-order-products .r61638-table-hint{display:none!important}
.r617710-product-cell{min-width:280px}
.r617710-product-cell .order-product-cell{margin-bottom:4px}
.r617710-packaging-summary{display:block;margin:3px 0 2px;padding:3px 6px;border-radius:7px;background:#f7f8fb;color:#667085;font-size:10px;line-height:1.35;width:max-content;max-width:100%;white-space:normal}
.r617710-packaging-editor{margin-top:4px!important;border:0!important;background:transparent!important}
.r617710-packaging-editor>summary{min-height:auto!important;padding:3px 0!important;color:#5b5bd6!important;font-size:10px!important}
.r617710-packaging-editor>summary b{font-size:9px!important}
.r617710-packaging-editor[open]{padding:7px!important;border:1px solid #e7e9f2!important;border-radius:9px!important;background:#fbfcff!important}
.r617710-line-primary input,.r617710-line-primary select{border-color:#ccd2e2!important;background:#fff!important}
.r617710-qty-cell input,.r617710-price-cell input{font-weight:700!important;color:#111827!important}
.r617710-amount-cell strong{font-size:14px;color:#111827}
.r617710-order-products table th:nth-child(7),.r617710-order-products table th:nth-child(8),.r617710-order-products table th:nth-child(9){background:#f5f6ff;color:#3738a4}
.r617710-order-products .order-image-option,.r617710-order-products .order-auto-plan-option{padding:8px 10px!important;min-height:auto!important}

/* Save/finish: explain the one missing thing and let users jump straight to it. */
.r617710-save-stage{margin:0 0 -2px;padding:0 4px}
.r617710-sticky-save{border:1px solid #dfe3f0!important;border-radius:14px!important;background:rgba(255,255,255,.96)!important;box-shadow:0 8px 26px rgba(15,23,42,.08)!important}
.r617710-sticky-save .r61650-readiness{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.r617710-sticky-save .r61650-readiness b{color:#4f46e5}
.r617710-sticky-save .r61650-readiness span{font-size:11px;color:#667085}
.r617710-missing-link{border:0;background:transparent;color:#4f46e5;padding:2px 4px;font-weight:700;cursor:pointer;font-size:11px;text-decoration:underline;text-underline-offset:2px}
.r617710-missing-link[hidden]{display:none!important}
.r617710-focus-flash{outline:3px solid rgba(99,102,241,.25)!important;box-shadow:0 0 0 5px rgba(99,102,241,.08)!important}

/* Low-frequency tools remain reachable but visually quiet. */
.r617710-order-entry .r61686-entry-tools>summary{padding:9px 12px!important}
.r617710-order-entry .r61686-entry-tools:not([open]){background:transparent!important}

@media(max-width:1200px){
 .r617710-order-core{grid-template-columns:repeat(2,minmax(0,1fr))}
 .r617710-order-core .order-field-wide{grid-column:1/-1!important}
 .r617710-order-more-body{grid-template-columns:1fr}
}
@media(max-width:780px){
 .r617710-readiness-main{align-items:flex-start;flex-direction:column}
 .r617710-readiness-actions{width:100%;justify-content:flex-start}
 .r617710-readiness-more[open]{position:static;width:100%;margin-top:8px}
 .r617710-order-core,.r617710-order-secondary{grid-template-columns:1fr!important}
 .r617710-order-core .order-field-wide,.r617710-order-secondary .order-field-wide{grid-column:auto!important}
 .r617710-order-stage{align-items:flex-start;flex-direction:column;gap:2px}
}
