/* 服务市场 v1 样式（与 home 同语言：暗色、圆卡、克制的绿） */
:root { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: #10131c; color: #dfe4ef;
       font-family: system-ui, "Segoe UI", "PingFang SC", sans-serif; }
a { color: #8fd0b8; }
.m-head { padding: 14px 20px; border-bottom: 1px solid #1c2230; }
.m-title { font-size: 18px; font-weight: 700; }
.m-badge { font-size: 11px; background: #223047; border-radius: 8px; padding: 2px 8px; color: #9fb3d9; }
.m-hint { font-size: 12px; color: #7d8aa5; margin-top: 4px; }
.m-head-actions { position: absolute; right: 20px; top: 16px; }
.m-layout { display: grid; grid-template-columns: 1fr 380px; gap: 18px;
            padding: 18px 20px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 900px) { .m-layout { grid-template-columns: 1fr; } }
.m-zone-title { font-size: 14px; color: #9fb3d9; margin: 14px 0 8px; }
.m-search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.m-search-row input, .m-search-row select { flex: 1; }
.m-list { display: flex; flex-direction: column; gap: 10px; }
.m-card { background: #161b28; border: 1px solid #232b3d; border-radius: 12px;
          padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.m-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chip-status { font-size: 11px; border-radius: 8px; padding: 2px 8px; white-space: nowrap; }
.chip-status.ok { background: #1d3329; color: #8fd0b8; }
.chip-status.warn { background: #3a2f1d; color: #e0c07f; }
.chip-status.off { background: #232b3d; color: #7d8aa5; }
.m-form { display: flex; flex-direction: column; gap: 8px; background: #161b28;
          border: 1px solid #232b3d; border-radius: 12px; padding: 12px 14px; }
.m-form input, .m-form textarea, .m-search-row input, .m-search-row select,
.m-form select { background: #10131c; border: 1px solid #2a3350; color: #dfe4ef;
                 border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; }
.m-row2 { display: flex; gap: 8px; }
.muted { color: #7d8aa5; }
.small { font-size: 12px; }
.primary { background: #2f6e57; color: #eafff6; border: none; border-radius: 8px;
           padding: 8px 14px; font: inherit; cursor: pointer; }
.ghost { background: transparent; border: 1px solid #2a3350; color: #9fb3d9;
         border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; }
.small-btn { font-size: 12px; padding: 5px 10px; }
.inbox-ops { display: flex; gap: 8px; }
.m-backdrop { position: fixed; inset: 0; background: rgba(4, 6, 12, 0.6); z-index: 8; }
.m-panel { position: fixed; z-index: 9; left: 50%; top: 18%; transform: translateX(-50%);
           width: min(560px, 92vw); background: #161b28; border: 1px solid #2a3350;
           border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
/* B-23：协作详情自身滚动，关闭按钮始终可见；背景不跟着滚。 */
body.modal-open { overflow: hidden; }
#collab-panel { top: 50%; transform: translate(-50%, -50%);
                max-height: min(86dvh, 760px); padding: 0; gap: 0; overflow: hidden; }
#collab-panel > h3 { margin: 0; padding: 14px 16px 0; }
#collab-panel > #cp-meta { margin: 0; padding: 4px 16px 0; }
#collab-panel > #cp-brief { margin: 0; padding: 6px 16px 0; max-height: 72px;
                            /* B-28：协作详情只保留一个滚动区（#cp-body），摘要区不单独滚动 */
                            overflow: hidden; }
#collab-panel > #cp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto;
                           overscroll-behavior: contain; padding: 10px 16px; }
#collab-panel > .m-row2 { flex: 0 0 auto; margin: 0; padding: 10px 16px;
                          border-top: 1px solid #2a3350; background: #161b28; }
#collab-panel > #cp-msg { flex: 0 0 auto; margin: 0; padding: 0 16px 10px; }
.grant-callout { border: 1px solid #2a3350; border-radius: 10px; padding: 10px;
                 display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.hidden { display: none; }

.m-card-img { width: 100%; max-height: 160px; object-fit: cover;
              border-radius: 8px; margin-bottom: 4px; }
.chip-img { max-width: 220px; max-height: 140px; border-radius: 8px; display: block; }
.chip-row { display: flex; align-items: center; gap: 10px; }
.chip-link { color: #8fd0b8; }
.pay-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
           border-top: 1px dashed #2a3350; padding-top: 6px; }
.pay-box input { flex: 1; min-width: 180px; background: #10131c; color: #dfe4ef;
                 border: 1px solid #2a3350; border-radius: 8px; padding: 6px 8px; font: inherit; }
.m-file { font-size: 12px; color: #9fb3d9; display: flex; flex-direction: column; gap: 4px; }
.m-file input { color: #dfe4ef; }

/* 2026-10-29 T9-23：原 style="white-space:pre-wrap"（内联属性被 CSP 丢弃） */
#cp-brief { white-space: pre-wrap; }

.danger-text { color: #b3261e; }

/* R1 第 7b 项：每步一个主按钮；390px 窄屏可点。 */
.order-primary-row { display: flex; margin: 8px 0; }
.order-primary { min-height: 40px; }
.order-id-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.order-more { margin-top: 6px; border-top: 1px dashed #2a3350; padding-top: 6px; }
.order-more > summary { cursor: pointer; color: #9fb3d9; font-size: 13px; }
@media (max-width: 420px) {
  .order-primary { width: 100%; min-height: 44px; font-size: 15px; }
  #collab-panel { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh;
                  border-radius: 0; border: 0; }
  #collab-panel > h3 { padding-top: 12px; }
  #collab-panel > .m-row2 { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

/* B-29：订单完成态按状态文字呈现，不做按钮 */
.order-status-done { color: #7fd88f; font-weight: 600; }

/* B-28/B-30：付款区在主区，测试单常显模拟提示 */
.pay-section { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #2a3350; }
.pay-parties { color: #dfe4ef; }
.test-order-badge { display: inline-block; margin: 4px 0; padding: 2px 8px;
                    border: 1px solid #8a6d1f; border-radius: 10px;
                    background: #2a2210; color: #f0d48a; font-size: 12px; }
