/* Digital Cart Picking — handheld-first styles (cp-* prefix). */

.cp-screen { padding: 12px; max-width: 640px; margin: 0 auto; }
.cp-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cp-title { font-size: 1.2rem; margin: 0; }
.cp-hint { font-size: 0.85rem; color: #666; margin-bottom: 10px; }
.cp-loading, .cp-empty { padding: 24px; text-align: center; color: #666; }
.cp-error { padding: 16px; background: #fdecea; color: #b3261e; border-radius: 6px; }

/* ---- scan-first entry ---- */
.cp-scan-hero {
    border: 2px dashed #2e7d32; border-radius: 10px; background: #f1f8f1;
    padding: 22px 16px; text-align: center; margin-bottom: 16px;
}
.cp-scan-icon { font-size: 2.2rem; letter-spacing: 2px; color: #2e7d32; font-family: monospace; }
.cp-scan-text { font-size: 1.15rem; font-weight: 800; margin-top: 8px; }
.cp-scan-sub { font-size: 0.82rem; color: #666; margin-top: 4px; }
.cp-list-heading { font-size: 0.8rem; font-weight: 700; color: #888;
    text-transform: uppercase; letter-spacing: 0.5px; margin: 0 2px 8px; }

/* ---- list ---- */
.cp-list { display: flex; flex-direction: column; gap: 8px; }
.cp-list-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px; background: #fff; border: 1px solid #ddd; border-radius: 8px;
    cursor: pointer;
}
.cp-list-item:active { background: #f2f2f2; }
.cp-list-code { font-weight: 700; font-size: 1.05rem; }
.cp-list-sub { font-size: 0.85rem; color: #555; margin-top: 2px; }
.cp-list-meta { font-size: 0.8rem; color: #888; margin-top: 2px; }
.cp-list-go { font-size: 1.6rem; color: #aaa; }
.cp-tag {
    display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 1px 6px;
    border-radius: 10px; background: #eee; color: #555; margin-left: 6px; vertical-align: middle;
}
.cp-tag-amber { background: #fff3cd; color: #8a6d3b; }
.cp-tag-done { background: #d4edda; color: #1e7e34; }

/* ---- walk: one product per screen ---- */
.cp-walk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cp-walk-run { font-size: 0.85rem; color: #555; font-weight: 600; }
.cp-walk-step { font-size: 0.95rem; font-weight: 700; }
.cp-progress { height: 8px; background: #eee; border-radius: 4px; margin: 8px 0 2px; overflow: hidden; }
.cp-progress-bar { height: 100%; background: #2e7d32; transition: width 0.2s; }
.cp-progress-label { font-size: 0.78rem; color: #777; text-align: right; }

.cp-zone {
    display: inline-block; font-weight: 700; letter-spacing: 1px; padding: 3px 10px;
    border-radius: 4px; background: #222; color: #fff; margin: 8px 0;
}
.cp-zone-MC { background: #777; }

.cp-zone-hint { font-size: 0.8rem; color: #b35900; margin: -4px 0 8px; font-weight: 600; }
.cp-bin { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 8px; }
.cp-binstock { font-size: 0.85rem; font-weight: 600; color: #888; margin-left: 8px; }

/* Item card — description + EAN lead (what the operator matches by eye and
   scans); the SAP code/SKU is the dim last line (operator feedback). */
.cp-item { display: flex; align-items: center; gap: 12px; background: #fafafa;
    border: 1px solid #e3e3e3; border-radius: 8px; padding: 10px; }
.cp-photo { width: 88px; height: 88px; object-fit: contain; background: #fff;
    border: 1px solid #eee; border-radius: 6px; flex: 0 0 auto; }
.cp-photo-empty { display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; color: #bbb; }
.cp-item-info { flex: 1 1 auto; min-width: 0; }
.cp-item-prod { font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
.cp-item-ean { font-family: monospace; font-size: 0.95rem; font-weight: 700;
    color: #2e7d32; margin-top: 3px; }
.cp-item-ean-none { color: #b35900; }
.cp-item-code { font-family: monospace; font-size: 0.78rem; color: #999; margin-top: 3px; }

/* tap-to-zoom photo overlay (tap again to close) */
.cp-zoom { position: fixed; inset: 0; background: rgba(0,0,0,0.82); z-index: 60;
    display: flex; align-items: center; justify-content: center; padding: 16px; }
.cp-zoom img { max-width: 100%; max-height: 100%; object-fit: contain;
    background: #fff; border-radius: 8px; }
.cp-item-qty { font-size: 2.2rem; font-weight: 800; flex: 0 0 auto; min-width: 48px; text-align: center; }

.cp-ampliamento { margin-top: 8px; padding: 8px 10px; background: #fff3b0;
    border: 2px solid #000; border-radius: 4px; font-weight: 700; }

.cp-phase { margin: 12px 0 6px; font-weight: 700; text-align: center; padding: 6px;
    border-radius: 6px; }
.cp-phase-item { background: #e3f2fd; color: #1565c0; }
.cp-phase-tote { background: #fff3e0; color: #e65100; }
.cp-phase-noean { background: #fff3e0; color: #b35900; }

.cp-dests { display: flex; flex-direction: column; gap: 6px; }
.cp-dest { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
    border: 2px solid #ccc; border-radius: 8px; }
.cp-dest-row { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; }
.cp-dest-done { border-color: #2e7d32; background: #e8f5e9; color: #2e7d32; }
.cp-dest-current { border-color: #1565c0; background: #e3f2fd; }
.cp-dest-held { border-color: #b35900; background: #fff3e0; color: #8a5200; }
.cp-dest-check { font-size: 1.3rem; width: 22px; text-align: center; }
.cp-dest-tote { font-weight: 800; font-size: 1.3rem; flex: 1 1 auto; }
.cp-dest-qty { font-weight: 800; font-size: 1.3rem; }
.cp-dest-order { font-size: 0.8rem; color: #666; padding-left: 34px; }
.cp-badge { display: inline-block; background: #222; color: #fff; font-size: 0.65rem;
    font-weight: 700; padding: 0 5px; border-radius: 3px; vertical-align: middle; }

/* problem modal */
.cp-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.cp-modal { background: #fff; border-radius: 12px; padding: 18px; width: 100%; max-width: 420px; }
.cp-modal-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 12px; }
.cp-modal-btn { display: block; width: 100%; margin-bottom: 8px; }

/* ---- held items (deferred tote association) ---- */
.cp-held-bar { display: block; width: 100%; margin-top: 10px; padding: 12px;
    border: 2px solid #b35900; border-radius: 8px; background: #fff3e0;
    color: #8a5200; font-weight: 800; font-size: 1rem; text-align: left; cursor: pointer; }
.cp-resume-bar { display: block; width: 100%; margin-bottom: 14px; padding: 14px 12px;
    border: 2px solid #1565c0; border-radius: 8px; background: #e3f2fd;
    color: #0d47a1; font-weight: 800; font-size: 1rem; text-align: left; cursor: pointer; }
.cp-tag-cart { background: #e3f2fd; color: #1565c0; }

.cp-pending-hint { font-size: 0.8rem; color: #777; margin: 4px 0 10px; }
.cp-pending-list { display: flex; flex-direction: column; gap: 8px; }
.cp-pending-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    background: #fff; border: 2px solid #ddd; border-radius: 8px; }
.cp-pending-top { border-color: #1565c0; background: #e3f2fd; }
.cp-pending-photo { width: 56px; height: 56px; object-fit: contain; background: #fff;
    border: 1px solid #eee; border-radius: 6px; flex: 0 0 auto; }
.cp-pending-info { flex: 1 1 auto; min-width: 0; }
.cp-pending-prod { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.cp-pending-meta { font-size: 0.78rem; color: #777; margin-top: 2px; }
.cp-pending-tote { font-weight: 800; font-size: 1.15rem; flex: 0 0 auto; }

/* ---- done ---- */
.cp-done { text-align: center; padding-top: 40px; }
.cp-done-icon { font-size: 4rem; color: #2e7d32; }
.cp-done-sub { color: #555; margin-top: 6px; }
