:root {
  --main-color: #5d5dff;
  --accent-color: #ffc80a;
  --green-soft: #66cc66;
  --red-soft: #cc4444;
}

body {
  margin: 0;
  font-family: sans-serif;
  background-color: black;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  overflow-y: auto;
}

body.light {
  background-color: white;
  color: black;
}

#logo {
  width: 200px;
  margin-top: 20px;
  cursor: pointer;
}

#connection-indicator {
  position: fixed;
  top: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: red;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 10px;
}

#reader {
  width: 100%;
  max-width: 320px;
  margin: 10px 0;
}

.input-field {
  font-size: 1.5em;
  padding: 10px;
  border-radius: 10px;
  border: none;
  margin: 10px 0;
  text-align: center;
}

.input-field.small {
  font-size: 1em;
  width: 120px;
  padding: 6px;
}

.button {
  padding: 10px 20px;
  background-color: var(--main-color);
  color: white;
  font-size: 1.2em;
  border: none;
  border-radius: 10px;
  margin: 10px;
  cursor: pointer;
}

.button:hover {
  background-color: var(--accent-color);
  color: black;
}

#feedback {
  font-size: 2em;
  margin: 20px;
  text-align: center;
}

#stats {
  font-size: 1.2em;
  margin: 10px;
}

.toggle-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  font-size: 14px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 20px;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #6366f1; /* purple-500 */
}

input:checked + .slider:before {
  transform: translateX(20px);
}

input:disabled + .slider {
  background-color: #999;
  cursor: not-allowed;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  table-layout: auto;
}

td, th {
  padding: 6px;
  text-align: left;
  word-break: break-word;
}

tr.scanned {
  background-color: var(--green-soft);
}

tr.not-scanned {
  background-color: var(--red-soft);
}

input[type="checkbox"]:disabled + .slider {
  background-color: #888;
  cursor: not-allowed;
}

