* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #0f1420; color: #f5f7fa;
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; overflow: hidden; }

#cam { position: fixed; inset: 0; background: #000; }
#video { width: 100%; height: 100%; object-fit: cover; }

/* scanning frame */
#frame { position: fixed; left: 10%; right: 10%; top: 34%; height: 26%;
  border: 3px solid rgba(255,176,32,.9); border-radius: 14px;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }

#top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between;
  padding: 14px 16px; font-size: 14px; font-weight: 600;
  background: linear-gradient(#000a, #0000); text-shadow: 0 1px 2px #000; }
#bar { color: #ffb020; text-transform: uppercase; letter-spacing: .5px; }
#status { color: #cdd4de; }

.overlay { position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 14px;
  padding: 32px; background: #0f1420; z-index: 5; }
.overlay .big { font-size: 64px; }
.overlay h1 { font-size: 24px; }
.overlay p { color: #96a0af; max-width: 340px; line-height: 1.4; }
button { margin-top: 10px; padding: 14px 28px; font-size: 17px; font-weight: 700;
  color: #12161e; background: #ffb020; border: 0; border-radius: 12px; cursor: pointer; }
button:active { transform: translateY(1px); }

/* result card */
#card { position: fixed; left: 12px; right: 12px; bottom: 18px; z-index: 4;
  background: rgba(18,22,30,.94); border: 1px solid #2a3140; border-radius: 16px;
  padding: 18px 20px; backdrop-filter: blur(6px); }
#cardName { font-size: 20px; font-weight: 700; line-height: 1.25; }
#cardPrice { font-size: 30px; font-weight: 800; color: #ffb020; margin-top: 6px; }
#cardPrice .bar { font-size: 15px; color: #cdd4de; font-weight: 600; margin-right: 6px; }
#cardEan { margin-top: 6px; font-size: 12px; color: #7c8698; font-variant-numeric: tabular-nums; }
#card.miss #cardName { color: #ff6b6b; }
#card.miss #cardPrice { display: none; }

.hidden { display: none !important; }

/* ---- tabs, add-form, list (przed terminem) ---- */
#tabs { position: fixed; top: 0; left: 0; right: 0; z-index: 6; display: flex;
  background: #0f1420; border-bottom: 1px solid #2a3140; }
.tab { flex: 1; margin: 0; border-radius: 0; background: transparent; color: #96a0af;
  font-size: 15px; font-weight: 700; padding: 12px 0; }
.tab.active { color: #ffb020; box-shadow: inset 0 -2px 0 #ffb020; }

#scanView, #listView { position: absolute; inset: 46px 0 0 0; }

.card { position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 4;
  background: rgba(18,22,30,.96); border: 1px solid #2a3140; border-radius: 16px;
  padding: 16px 18px; backdrop-filter: blur(6px); }
#fName { font-size: 19px; font-weight: 700; line-height: 1.25; }
#fStock { margin-top: 2px; }
.card label { display: block; margin-top: 12px; font-size: 13px; color: #96a0af; }
.card input { width: 100%; margin-top: 6px; padding: 12px 12px; font-size: 16px;
  color: #e7ecf3; background: #0f1420; border: 1px solid #2a3140; border-radius: 10px; box-sizing: border-box; }
.card .row { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.card .row input { flex: 1; margin-top: 0; }
button.mini { margin-top: 0; padding: 10px 14px; font-size: 14px; }
button.ghost { background: #232a37; color: #cdd4de; }
.muted { color: #7c8698; font-size: 13px; }

#listBox { padding: 12px; color: #e7ecf3; overflow-y: auto; height: 100%; box-sizing: border-box; }
.item { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid #202634; }
.itemMain { flex: 1; min-width: 0; }
.itemMain b { font-size: 16px; }
.itemBtns { display: flex; gap: 6px; }

/* ---- intro / start screen ---- */
#hero { margin-bottom: 6px; }
.steps { list-style: none; padding: 0; margin: 6px 0 10px; text-align: left; max-width: 320px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 7px 0; color: #cdd4de; font-size: 15px; line-height: 1.3; }
.steps li span { flex: 0 0 24px; height: 24px; border-radius: 50%; background: #ffb020; color: #12161e;
  font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.steps b { color: #e7ecf3; }
.hint { margin-top: 12px; font-size: 12px; color: #7c8698; }
