/* Continuous camera scanner (shared by the iPOS apps) */
.scan-ov { position: fixed; inset: 0; z-index: 2147483000; background: rgba(8,14,22,.86); display: flex; align-items: center; justify-content: center; padding: 0; }
.scan-box { width: min(560px, 100%); height: min(780px, 100%); max-height: 100%; background: #0b1520; color: #fff; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.scan-top { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #101e2c; }
.scan-top b { flex: 1; font-size: 15px; }
.scan-top .cnt { background: #1fa855; color: #fff; border-radius: 99px; padding: 2px 10px; font-weight: 700; font-size: 13px; }
.scan-top button { border: 0; background: #1c3144; color: #fff; border-radius: 9px; min-height: 34px; padding: 0 11px; font-weight: 600; font-size: 13px; cursor: pointer; }
.scan-top button.on { background: #f0b04a; color: #1a1a1a; }
.scan-view { position: relative; flex: 1 1 auto; min-height: 220px; background: #000; overflow: hidden; }
.scan-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 8%; right: 8%; top: 28%; bottom: 28%; border: 2px solid rgba(255,255,255,.85); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); transition: border-color .15s, box-shadow .15s; pointer-events: none; }
.scan-frame::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ff4d4d; opacity: .8; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 18%; } to { top: 82%; } }
.scan-view.ok .scan-frame { border-color: #3ecf8e; box-shadow: 0 0 0 9999px rgba(62,207,142,.28); }
.scan-view.bad .scan-frame { border-color: #ff6b6b; box-shadow: 0 0 0 9999px rgba(255,80,80,.3); }
.scan-msg { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-weight: 700; font-size: 14px; padding: 0 12px; text-shadow: 0 1px 3px #000; }
.scan-list { flex: 0 0 auto; max-height: 28%; overflow-y: auto; background: #0b1520; padding: 4px 10px; font-size: 13.5px; }
.scan-list div { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px solid #1c3144; }
.scan-list div span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-list .no { color: #ff8a8a; }
.scan-list .yes b { color: #3ecf8e; }
.scan-foot { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #101e2c; display: flex; gap: 8px; align-items: center; }
.scan-foot .hint { flex: 1; font-size: 12px; color: #9db2c6; }
.scan-foot button { border: 0; background: #1fa855; color: #fff; border-radius: 10px; min-height: 42px; padding: 0 22px; font-weight: 700; font-size: 15px; cursor: pointer; }
.scan-ask { position: absolute; inset: 0; background: rgba(8,14,22,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; }
.scan-ask b { font-size: 15px; }
.scan-ask .q { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.scan-ask button { border: 0; background: #1c3144; color: #fff; border-radius: 10px; min-width: 46px; min-height: 44px; font-weight: 700; font-size: 16px; cursor: pointer; }
.scan-ask button.go { background: #1fa855; padding: 0 20px; }
.scan-ask input { width: 90px; min-height: 44px; font-size: 20px; text-align: center; border-radius: 10px; border: 0; background: #fff; color: #111; }
@media (max-width: 640px) { .scan-box { width: 100%; height: 100%; border-radius: 0; } }
.scan-btn { white-space: nowrap; }

.voice-view { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; padding: 18px 14px; background: #0b1520; overflow-y: auto; }
.voice-view.ok { box-shadow: inset 0 0 0 4px #3ecf8e; } .voice-view.bad { box-shadow: inset 0 0 0 4px #ff6b6b; }
.voice-mic { width: 84px; height: 84px; border-radius: 50%; background: #1c3144; display: flex; align-items: center; justify-content: center; font-size: 36px; cursor: pointer; flex: none; }
.voice-mic.on { background: #1fa855; animation: vpulse 1.3s ease-in-out infinite; }
@keyframes vpulse { 0% { box-shadow: 0 0 0 0 rgba(62,207,142,.5); } 100% { box-shadow: 0 0 0 22px rgba(62,207,142,0); } }
.voice-say { color: #9db2c6; font-size: 13px; text-align: center; }
.voice-heard { font-size: 17px; font-weight: 700; text-align: center; min-height: 26px; }
.voice-pick { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.voice-pick .voice-q { color: #f0b04a; font-weight: 700; font-size: 13px; }
.voice-pick button { border: 0; background: #1c3144; color: #fff; border-radius: 10px; min-height: 44px; padding: 0 12px; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.voice-ov .scan-view { flex: 1 1 auto; }

.pos-find { display: flex; gap: 8px; align-items: stretch; }
@media (max-width: 640px) { .pos-find { flex-wrap: wrap; } .pos-find .ac-wrap { flex: 1 1 100% !important; } .pos-find .scan-btn { flex: 1 1 0; min-height: 44px; } }
.scan-btn svg { width: 20px; height: 20px; flex: none; }
.ac-wrap .vi-has { padding-right: 52px; }
.vi-mic { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand-soft, #e6f0f7); color: var(--brand, #0f5c8c); display: flex; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation; padding: 0; }
.vi-mic svg { width: 21px; height: 21px; }
.vi-mic.on { background: #d92d20; color: #fff; animation: viPulse 1.3s ease-out infinite; }
@keyframes viPulse { 0% { box-shadow: 0 0 0 0 rgba(217,45,32,.5); } 70% { box-shadow: 0 0 0 11px rgba(217,45,32,0); } 100% { box-shadow: 0 0 0 0 rgba(217,45,32,0); } }
.vi-status { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--brand-soft, #e6f0f7); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.vi-status[hidden] { display: none; }
.vi-status.ok { background: #e3f4ec; color: #0c6039; } .vi-status.bad { background: #fde8e6; color: #8f1d17; } .vi-status.ask { background: #fdf1df; color: #7a4308; }
.vi-status button { border: 1px solid currentColor; background: #fff; color: inherit; border-radius: 8px; min-height: 36px; padding: 0 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.vi-status.live button { margin-left: auto; min-height: 30px; }
html[data-theme=dark] .vi-status.ok { background: #12372a; color: #7ee2b0; } html[data-theme=dark] .vi-status.bad { background: #3b1a17; color: #ffb4ab; } html[data-theme=dark] .vi-status.ask { background: #3d2a10; color: #f6c98a; } html[data-theme=dark] .vi-status button { background: transparent; }
