/* V1358 進銷存「訂貨表」：每家廠商一張表，品名完整顯示，字放大。 */
.inv-osheet { padding: 10px 12px 16px; }
.inv-osheet-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.inv-osheet-bar .btn { font-size: .95rem; }
.inv-osheet-supplier { width: auto; min-width: 150px; font-size: .95rem; }
.inv-osheet-search { width: 180px; font-size: .95rem; }
.inv-osheet-hint { color: #94A3B8; font-size: .9rem; }
.inv-osheet-hint b { color: #F59E0B; font-size: 1.05rem; }
.inv-osheet-empty { padding: 28px; text-align: center; color: #94A3B8; font-size: 1.05rem; border: 1px dashed #2D343F; border-radius: 8px; }

/* V1360：像報紙分欄，一張表接著一張往下排，不留大片空白。 */
.inv-osheet-groups { column-width: 520px; column-gap: 14px; }
.inv-osheet-group { border: 1px solid #2D343F; border-radius: 8px; overflow: hidden; background: #151921; break-inside: avoid; page-break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 14px; vertical-align: top; }
.inv-osheet-group.is-no-supplier { border-style: dashed; border-color: #6B7280; }
.inv-osheet-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 12px; background: rgba(16,185,129,.12); border-bottom: 1px solid #2D343F; }
.is-no-supplier .inv-osheet-head { background: rgba(148,163,184,.10); }
.inv-osheet-sup { font-size: 1.15rem; font-weight: 800; color: #10B981; }
.is-no-supplier .inv-osheet-sup { color: #CBD5E1; }
.inv-osheet-count { color: #94A3B8; font-size: .9rem; }
.inv-osheet-warn { color: #F59E0B; font-size: .85rem; }

.inv-osheet-table { width: 100%; border-collapse: collapse; font-size: 1rem; color: #E2E8F0; }
.inv-osheet-table th { font-weight: 600; font-size: .85rem; color: #94A3B8; text-align: right; padding: 6px 8px; border-bottom: 1px solid #2D343F; white-space: nowrap; background: #1a2030; }
.inv-osheet-table th.c-name { text-align: left; }
.inv-osheet-table td { padding: 5px 8px; border-bottom: 1px solid #232a36; text-align: right; white-space: nowrap; vertical-align: middle; }
.inv-osheet-table td.c-name { text-align: left; white-space: normal; width: 34%; }
.inv-osheet-table tr:hover td { background: rgba(16,185,129,.06); }
.inv-osheet-table tr.inv-low-bg td { background: rgba(220,38,38,.10); }
.inv-osheet-table tr.is-added td { background: rgba(16,185,129,.13); }
.inv-osheet-table .inv-order-item-name { font-weight: 700; font-size: 1.05rem; cursor: pointer; white-space: normal; overflow: visible; word-break: break-all; }
.inv-osheet-table .inv-order-item-name:hover { color: #10B981; text-decoration: underline; }
.inv-osheet-dim { color: #4B5563; }
.inv-osheet-table .inv-col-unit { color: #94A3B8; font-size: .82rem; margin-left: 3px; display: inline-block; min-width: 1.6em; text-align: left; }

.inv-osheet-table input.inv-qty-input,
.inv-osheet-table input.inv-order-qty-input {
  width: 66px; height: 32px; padding: 2px 6px; font-size: 1.02rem; font-weight: 700; text-align: right;
  border-radius: 5px; border: 1px solid #2D343F !important; background: #1a2030 !important; color: #E2E8F0 !important;
}
/* V1363：負數＝還沒點貨，不可信，用灰色 */
.inv-osheet-table input.inv-qty-input.is-negative { color: #6B7280 !important; font-weight: 400; }
.inv-osheet-table input.inv-order-qty-input { width: 74px; border-color: #d97706 !important; background: rgba(217,119,6,.10) !important; color: #FBBF24 !important; }
.inv-osheet-table input.inv-order-qty-input.order-confirmed { border-color: #10B981 !important; background: rgba(16,185,129,.16) !important; color: #6EE7B7 !important; }

.inv-osheet-table td.c-act { width: 1%; }
.inv-osheet-table .inv-order-btn { height: 32px; line-height: 30px; padding: 0 10px; font-size: .95rem; border-radius: 5px; vertical-align: middle; }
.inv-osheet-table .inv-osheet-other { padding: 0 8px; margin-right: 6px; opacity: .65; }
.inv-osheet-table .inv-osheet-other:hover { opacity: 1; }
.inv-osheet-table .inv-osheet-add { min-width: 64px; font-weight: 700; }

@media (max-width: 700px) {
  .inv-osheet-groups { column-count: 1; }
  .inv-osheet-table th:nth-child(4), .inv-osheet-table td:nth-child(4),
  .inv-osheet-table th:nth-child(5), .inv-osheet-table td:nth-child(5) { display: none; }
}

/* V1362 安全量參考值與「哪些商品放庫存」設定 */
.inv-osheet-est { font-style: italic; color: #93C5FD; }
.inv-sflag-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; padding: 16px; }
.inv-sflag-panel { background: #151921; color: #E2E8F0; border: 1px solid #2D343F; border-radius: 10px; width: min(1100px, 100%); max-height: 92vh; display: flex; flex-direction: column; padding: 16px 18px; }
.inv-sflag-loading { padding: 40px; text-align: center; color: #94A3B8; }
.inv-sflag-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inv-sflag-head h3 { margin: 0; font-size: 1.3rem; font-weight: 800; color: #10B981; }
.inv-sflag-help { color: #94A3B8; font-size: .95rem; margin: 8px 0 10px; }
.inv-sflag-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.inv-sflag-tools input { width: 220px; }
.inv-sflag-count { color: #CBD5E1; }
.inv-sflag-count b { color: #10B981; font-size: 1.1rem; }
.inv-sflag-list { overflow-y: auto; flex: 1; column-width: 320px; column-gap: 14px; }
.inv-sflag-list section { break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 12px; border: 1px solid #2D343F; border-radius: 8px; padding: 8px 10px; }
.inv-sflag-list h4 { font-size: 1.05rem; font-weight: 800; color: #10B981; margin: 0 0 6px; }
.inv-sflag-grid { display: flex; flex-direction: column; gap: 2px; }
.inv-sflag-item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 5px; cursor: pointer; font-size: 1rem; margin: 0; }
.inv-sflag-item:hover { background: rgba(16,185,129,.08); }
.inv-sflag-item.is-on .inv-sflag-name { font-weight: 700; }
.inv-sflag-item.is-dirty { background: rgba(245,158,11,.14); }
.inv-sflag-item input { width: 20px; height: 20px; accent-color: #10B981; flex: none; }
.inv-sflag-name { flex: 1; word-break: break-all; }
.inv-sflag-days { color: #94A3B8; font-size: .85rem; white-space: nowrap; }
.inv-sflag-tag { font-size: .75rem; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.inv-sflag-tag.is-suggest { background: rgba(16,185,129,.18); color: #6EE7B7; }
.inv-sflag-tag.is-market { background: rgba(245,158,11,.18); color: #FBBF24; }
.inv-sflag-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid #2D343F; margin-top: 8px; }
.inv-sflag-foot b { color: #F59E0B; }

/* V1364 叫貨截止提醒與設定 */
.inv-osheet-cutoff { font-size: .85rem; color: #93C5FD; border: 1px solid #1E3A5F; border-radius: 12px; padding: 1px 8px; white-space: nowrap; }
.inv-osheet-cutoff.is-soon { color: #FCA5A5; border-color: #DC2626; background: rgba(220,38,38,.15); font-weight: 700; }
.inv-osheet-cutoff.is-past { color: #6B7280; border-color: #374151; }
.inv-cutoff-panel { width: min(640px, 100%); }
.inv-cutoff-panel .inv-sflag-list { column-width: auto; }
.inv-cutoff-grid { display: grid; grid-template-columns: 1fr 130px 130px; gap: 6px 10px; align-items: center; }
.inv-cutoff-grid b { color: #94A3B8; font-size: .85rem; font-weight: 600; }
.inv-cutoff-name { font-weight: 700; }
.inv-cutoff-panel input[type=time] { background: #1a2030; color: #E2E8F0; border: 1px solid #2D343F; border-radius: 5px; padding: 3px 6px; color-scheme: dark; }

/* V1365 第 2 區：追加提醒 */
.inv-osheet-cutoff.is-addition { color: #FBBF24; border-color: #B45309; background: rgba(245,158,11,.12); }
.inv-osheet-addtag { font-size: .72rem; color: #FBBF24; white-space: nowrap; }
