/* 「叫貨」分頁的叫貨(購物車)與叫貨紀錄(public/proc-order-ui.js)。舊 WebView:不用 gap、不用 grid、不用 :has();
 * 觸控區 >= 44px;手機 375px 寬不出現整頁橫向捲動(表格包在 .proc-scroll 裡自己捲,原料列用可換行的 flex) */
#tab-proc .po-note { display: block; margin: 8px 0 12px; font-size: 14px; font-weight: 700; }
#tab-proc .po-note input { display: block; width: 100%; max-width: 420px; min-height: 44px; margin-top: 4px; box-sizing: border-box; font-size: 16px; font-weight: 400; }
.po-pending { border-color: #fedf89; border-left: 4px solid #f59e0b; background: #fffaeb; }
.po-plist { margin: 6px 0 0; padding: 0; list-style: none; }
.po-plist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 2px 0; }
.po-plist li span { flex: 1 1 180px; min-width: 0; margin-right: 8px; }
.po-plist button, .po-hf button { min-height: 44px; }
.po-snote { margin: 4px 0; }
.po-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.po-info { flex: 1 1 170px; min-width: 0; margin-right: 8px; }
.po-info > b { font-size: 16px; line-height: 1.5; }
.po-meta { font-size: 13px; line-height: 1.5; color: var(--muted); }
.po-qty { flex: 0 0 auto; margin-top: 4px; white-space: nowrap; }
.po-sug { min-height: 48px; margin-right: 6px; padding: 0 10px; vertical-align: middle; }
.po-sub { flex: 1 1 100%; text-align: right; font-size: 13px; color: var(--muted); }
.po-sub:empty { display: none; }
.po-off .po-info > b, .po-off .po-meta { color: #98a2b3; }
.po-warn { color: #b42318; font-size: 13px; line-height: 1.5; }
.po-warn:empty { display: none; }
/* 底部:依廠商的小計與檢查結果,黏在畫面下緣(外框在 proc-ui.css);內容多時自己捲 */
.po-bar { max-height: 50vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.po-vrow { margin: 0 0 6px; padding: 6px 10px; border-radius: 10px; background: #e6f4ea; }
.po-st-warn { background: #fff4e0; }
.po-st-blocked { background: #fdecea; }
.po-msg { font-size: 13px; }
.po-topup { min-height: 44px; margin-top: 4px; }
.po-limits { margin: 0 0 6px; }
.po-done h3 { margin: 6px 0 10px; }
.po-lines { margin: 6px 0; padding-left: 18px; }
.po-lines li { margin: 0 0 4px; }
.po-send { margin: 8px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--line); }
.po-copy textarea { display: block; width: 100%; min-height: 120px; margin: 6px 0; padding: 8px; box-sizing: border-box; font-size: 14px; line-height: 1.5; }
.po-send button, .po-done .proc-btns button { min-height: 44px; margin: 0 6px 6px 0; }
.po-m button { min-height: 44px; }
.po-m .proc-btns button { margin: 0 6px 6px 0; }
.po-pen { margin: 8px 0; }
.po-audit li { margin: 0 0 8px; }
.po-htable td { white-space: nowrap; }

/* 提醒區(提醒用項目):叫貨畫面另一區、送出結果與叫貨紀錄的卡片(黃 = 提醒) */
.po-notes { margin-top: 18px; padding: 4px 12px 8px; border: 1px solid var(--line); border-left: 4px solid #f0b429; border-radius: 12px; background: #fffaf0; }
.po-notes > .hint { margin: 2px 0 6px; }
/* 提醒區平常收成一行標題(有點的寫幾項的小數字),點了展開 */
.po-notes .po-nhead { display: block; width: 100%; min-height: 44px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 800; letter-spacing: .5px; text-align: left; box-shadow: none; cursor: pointer; }
.po-notes:not(.open) .pg-caret { -webkit-transform: rotate(-45deg); transform: rotate(-45deg); }
.po-notes.open .po-nhead { border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.po-ncount { display: inline-block; min-width: 20px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: #f0b429; color: #fff; font-size: 12px; font-weight: 800; text-align: center; letter-spacing: 0; }
.po-notice-card { border-left: 4px solid #f0b429; background: #fffaf0; }
.po-hnotes { margin-bottom: 12px; }
.po-hnotes .po-card { margin-bottom: 8px; }
/* 叫貨品項卡:兩欄(窄螢幕一欄)、名稱 + 說明 + 小標籤,右下加入 / 數量鈕(參考舊店務系統) */
[data-pg-list="po"] .pg-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; padding: 10px 12px 12px; }
[data-pg-list="po"] .pg-item { margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel, #fff); }
[data-pg-list="po"] .pg-item.pg-keep { margin: 0; padding: 0; border-color: #8fb4f5; background: #f5f9ff; }
[data-pg-list="po"] .pg-more { grid-column: 1 / -1; }
[data-pg-list="po"] .po-row { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; height: 100%; box-sizing: border-box; padding: 10px 12px; border-bottom: 0; }
[data-pg-list="po"] .po-row.po-on { background: transparent; }
[data-pg-list="po"] .po-row.po-off { background: #fff5f5; border-radius: 12px; }
.po-info { margin-right: 0; }
.po-desc { margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.po-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.po-chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--soft, #eef1f5); color: var(--ink-soft, #475467); font-size: 12px; font-weight: 600; line-height: 1.5; }
.po-chip-sug { background: var(--info-bg, #e7f5ff); color: var(--info-fg, #1864ab); }
[data-pg-list="po"] .po-qty { align-self: flex-end; margin-top: 8px; }
[data-pg-list="po"] .po-sub { text-align: right; }
/* 卡片是直排:原本橫排用的 flex 基準(170px、100%)在直排會變成高度,要歸零,卡片才不會被撐高 */
[data-pg-list="po"] .po-info { flex: 0 0 auto; }
[data-pg-list="po"] .po-sub { flex: 0 0 auto; }
.po-chip-off { background: #fff0f0; color: #c92a2a; }
