*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto;background:#fff;color:#111}
.container{max-width:720px;margin:0 auto;padding:16px}
.tabs{position:sticky;top:0;background:#fff;padding:8px 0;margin-bottom:8px;border-bottom:1px solid #eee;z-index:10}
.tab{margin-right:8px;padding:10px 14px;border:1px solid #ddd;border-radius:8px;background:#f7f7f7;color:#111}
.tab.active{background:#1976d2;color:#fff;border-color:#1976d2}
h1{font-size:20px;margin:8px 0 16px}
.section{margin-top:8px}
.hidden{display:none}
.search{display:flex;gap:8px;margin-bottom:16px}
input{flex:1;padding:10px;border:1px solid #ccc;border-radius:6px;background:#fff;color:#111}
.search-input{position:relative;flex:1}
.search-input input{width:100%;padding-right:44px}
.scan-btn{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:1px solid #ddd;background:#fafafa;color:#111;border-radius:6px;padding:6px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.scan-btn:hover{background:#f0f0f0}
.scan-btn:active{background:#e6e6e6}
.scan-btn svg{display:block}
button{padding:10px 14px;border:0;border-radius:6px;background:#1976d2;color:#fff}
.results{display:flex;flex-direction:column;gap:12px}
.card{border:1px solid #eee;border-radius:10px;padding:12px;box-shadow:0 1px 2px rgba(0,0,0,0.04)}
.name{font-weight:700;font-size:16px;margin-bottom:6px}
.prices{display:flex;gap:16px;margin-bottom:6px}
.price-sale{color:#d32f2f;font-weight:600}
.price-purchase{color:#455a64}
.barcode{font-family:ui-monospace, SFMono-Regular, Menlo, monospace;color:#222}
mark{background:#ffec99}
.row{display:flex;justify-content:space-between;padding:4px 0}
.row span:first-child{color:#555}
.empty{color:#999}
.loading{color:#1976d2}
.status{margin-top:8px;color:#555}
.import{margin-top:12px;display:flex;gap:8px;align-items:center}
.scanner-message{margin-bottom:8px;color:#555}
.scanner-message.hidden{display:none}
.modal{position:fixed;inset:0;background:rgba(0,0,0,0.4);display:flex;align-items:center;justify-content:center}
.modal.hidden{display:none}
.modal-content{background:#fff;border-radius:10px;padding:12px;width:92%;max-width:480px}
@media (max-width:600px){
  .container{padding:12px}
  .tab{padding:8px 12px}
  .prices{flex-direction:column}
  .import{flex-direction:column;align-items:stretch}
  .search{display:grid;grid-template-columns:4fr 1fr;gap:8px}
}
