:root {
  --g: #0b6b4f;
  --d: #123d32;
  --l: #dbf265;
  --line: #dce6e1;
  --bg: #f4f7f5;
  --muted: #6c7974;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: #172620;
  font:
    16px Arial,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--d), var(--g));
  padding: 20px;
}
.login form,
.modal {
  background: white;
  width: min(430px, 100%);
  padding: 30px;
  border-radius: 18px;
}
.login h1 {
  margin: 0 0 8px;
}
.login p {
  color: var(--muted);
}
label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin: 13px 0;
}
input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid #cfdad5;
  border-radius: 9px;
  padding: 0 11px;
  margin-top: 7px;
}
.primary {
  border: 0;
  background: var(--g);
  color: white;
  padding: 13px 17px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
}
.secondary {
  width: 100%;
  margin-top: 12px;
  padding: 12px 17px;
  border: 1px solid #b9c9c2;
  border-radius: 10px;
  background: white;
  color: var(--d);
  font-weight: bold;
  cursor: pointer;
}
.secondary:hover {
  background: #eef4f1;
}
.secondary:focus-visible {
  outline: 3px solid #9fcdbf;
  outline-offset: 2px;
}
.secondary.compact {
  width: auto;
  margin: 0;
  padding: 7px 10px;
}
.login .primary {
  width: 100%;
  margin-top: 10px;
}
.platform-link {
  display: block;
  margin-top: 18px;
  color: var(--g);
  text-align: center;
  font-size: 14px;
}
.shell {
  min-height: 100vh;
}
.top {
  background: var(--d);
  color: white;
  padding: 18px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top h1 {
  font-size: 20px;
  margin: 0;
}
.top small {
  color: #bdd2c9;
}
.top button {
  background: #ffffff18;
  color: white;
  border: 0;
  padding: 9px;
  border-radius: 8px;
}
.wrap {
  width: min(1180px, 92%);
  margin: 30px auto;
}
.platform-wrap {
  max-width: 900px;
}
.sync-status {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}
.history-panel {
  margin-top: 16px;
}
.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.user-row small {
  display: block;
  color: var(--muted);
}
.hero {
  background: linear-gradient(120deg, var(--g), var(--d));
  color: white;
  border-radius: 20px;
  padding: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hero h2 {
  font-size: 32px;
  margin: 8px 0;
}
.hero p {
  color: #cde0d8;
}
.scan {
  background: var(--l);
  color: var(--d);
  border: 0;
  border-radius: 13px;
  padding: 18px;
  font-weight: bold;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 18px 0;
}
.stats article,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.stats b {
  display: block;
  font-size: 27px;
}
.stats small {
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}
.panel {
  overflow: auto;
}
.panel h3 {
  margin-top: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 13px;
  border-bottom: 1px solid #edf1ef;
  font-size: 14px;
}
td small {
  display: block;
  color: var(--muted);
}
.overlay {
  position: fixed;
  inset: 0;
  background: #10251f99;
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal {
  max-height: 92vh;
  overflow: auto;
}
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wide {
  grid-column: 1/-1;
}
.camera {
  height: 280px;
  background: #15231e;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scan-guide {
  position: absolute;
  inset: 28% 7%;
  border: 3px solid var(--l);
  border-radius: 12px;
  box-shadow: 0 0 0 999px #0005;
  pointer-events: none;
}
.scanner-status {
  min-height: 38px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 14px;
}
.torch-button {
  margin: 0 0 8px;
}
.error {
  color: #b33;
  background: #fee;
  padding: 10px;
  border-radius: 8px;
}
@media (max-width: 700px) {
  .hero {
    display: block;
  }
  .hero h2 {
    font-size: 27px;
  }
  .scan {
    width: 100%;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .form {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: 1;
  }
  .wrap {
    margin: 18px auto;
  }
  .top {
    align-items: flex-start;
  }
  .actions {
    flex-wrap: wrap;
  }
}
