* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f4f4f5;
  color: #111;
}

/* --- вкладки --- */
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #ddd;
}
.tab {
  border: 1px solid #ccc;
  background: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}
.tab.active {
  background: #111;
  color: #fff;
  border-color: #111;
}
.count {
  margin-left: auto;
  font-size: 14px;
  color: #666;
}

/* --- секции --- */
.view { display: none; padding: 20px; }
.view.active { display: block; }

/* --- ввод --- */
#idInput {
  width: 100%;
  max-width: 520px;
  height: 40vh;
  min-height: 220px;
  display: block;
  margin: 0 auto 14px;
  padding: 12px;
  font-size: 16px;
  font-family: ui-monospace, Consolas, monospace;
  border: 1px solid #ccc;
  border-radius: 8px;
  resize: vertical;
}
.row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
button {
  font-size: 16px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}
button:hover { background: #f0f0f0; }
#btnGenerate {
  background: #111;
  color: #fff;
  border-color: #111;
}
#btnGenerate:hover { background: #333; }

/* --- просмотр / скан --- */
.viewer {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}
.idText {
  font-size: 20px;
  font-weight: 600;
  font-family: ui-monospace, Consolas, monospace;
  margin-bottom: 10px;
  word-break: break-all;
}
#barcode {
  background: #fff;
  width: 100%;
  max-width: 340px;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.nav button {
  flex: 1;
  padding: 16px;
  font-size: 17px;
}
.pos {
  min-width: 70px;
  font-size: 15px;
  color: #444;
}
#jumpInput {
  margin-top: 12px;
  width: 140px;
  padding: 8px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: center;
}

.empty-hint {
  text-align: center;
  color: #888;
  margin-top: 40px;
  font-size: 15px;
}
