/* Offline scanning (mobile phase 2, public/js/offline.js): the top-bar sync icon, the scan station strip and result,
   the waiting rows, and #/warehouse/sync. Amber (--warn) means "saved on this phone, not final yet"; green stays for done. */

/* ── top-bar sync icon ── */
.off-sync { display: inline-flex; align-items: center; gap: 6px; position: relative; white-space: nowrap; }
.off-sync[hidden] { display: none !important; }
.off-sync svg { flex-shrink: 0; }
.off-sync[data-tone="ok"] { color: var(--steel); }
.off-sync[data-tone="wait"] { color: var(--warn); border-color: var(--warn); background: var(--warn-wash); }
.off-sync[data-tone="attn"] { color: var(--bad); border-color: var(--bad); background: var(--bad-wash); }
.off-sync[data-offline="1"] { color: var(--graphite); }
.off-sync-n { display: none; }
.off-show-act.off-hidden { display: none !important; }

/* ── scan station: strip under the scan box ── */
.off-station { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 14px; margin: 10px 0 0;
  border: 2px solid var(--warn); background: var(--warn-wash); border-radius: var(--r-panel); color: var(--graphite); }
.off-station[hidden] { display: none; }
.off-station-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.off-station-main svg { flex-shrink: 0; color: var(--warn); }
.off-station-age { display: block; color: var(--steel); }
.off-station:not(.is-offline) { border-color: var(--rule); background: var(--paper); }

/* "Saved on this phone": amber, never the green Done */
.wh-result.offline { background: var(--warn-wash); border-color: var(--warn); }
.wh-result.offline .wh-result-icon { background: var(--warn); color: #fff; }
.wh-result.flash.offline { --flash: #F2CE85; }
.off-copy-badge { display: inline-block; margin-left: 6px; }

/* waiting rows in Recent scans */
.off-waiting .off-row, .off-waiting li { background: var(--warn-wash); }
.off-waiting + .wh-scans { margin-top: 0; }
.wh-undo[disabled] { opacity: .7; cursor: not-allowed; }
.off-banner { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--r-ctl); background: var(--warn-wash);
  border: 1px solid var(--warn); margin: 0 0 12px; }

/* ── #/warehouse/sync ── */
.off-page { display: grid; gap: 16px; max-width: 900px; }
.off-page .card { margin: 0; }
.off-status-body { display: flex; align-items: center; gap: 16px; }
.off-status-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-wash); color: var(--ok); flex-shrink: 0; }
.off-status.is-offline .off-status-ico { background: var(--warn-wash); color: var(--warn); }
.off-status-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.off-status-txt strong { font-family: var(--font-display); font-size: 22px; }
.off-others, .off-ios { margin: 0; padding: 0 16px 14px; }
.off-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.off-issue { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 12px; border: 1px solid var(--rule); border-left: 4px solid var(--warn); border-radius: var(--r-ctl); }
.off-issue p { margin: 6px 0 4px; }
.off-issue-main { min-width: 0; flex: 1; }
.off-issue-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.off-copy-sum { margin: 0 0 10px; }
.off-shows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.off-shows li { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.off-copy-note { margin: 12px 0 0; }

/* phones */
@media (max-width: 640px) {
  .off-sync { min-width: var(--m-tap, 44px); min-height: var(--m-tap, 44px); justify-content: center; padding: 0 8px; }
  .off-sync-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .off-sync-n { display: inline; font-weight: 700; font-size: 13px; }
  .off-station { flex-wrap: wrap; padding: 8px 10px; }
  .off-station .btn { min-height: 44px; }
  .off-status-body { flex-wrap: wrap; }
  .off-status-body .btn { width: 100%; min-height: 44px; }
  .off-issue { flex-direction: column; }
  .off-issue-acts { width: 100%; display: grid; grid-template-columns: 1fr; }
  .off-issue-acts .btn { min-height: 44px; }
}

/* audit fixes: refused scans, scans not saved yet, notes from sent scans */
.off-held { display: block; }
.off-refused { border-color: var(--bad); }
.off-refused-note { margin: 0 0 10px; }
.off-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.off-notes li { padding: 8px 10px; border-left: 3px solid var(--warn); background: var(--warn-wash); border-radius: var(--r-ctl); }
.off-notes p { margin: 4px 0 0; }
.off-refused-acts { display: flex; gap: 6px; flex-wrap: wrap; }
