:root {
  font:
    16px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #183238;
  background: #f4f7f7;
  --green: #115c58;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  padding: 20px max(18px, calc((100vw - 1000px) / 2));
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  border-bottom: 1px solid #dce4df;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 850;
  color: var(--green);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.access-logo {
  width: 100%;
  max-width: 360px;
  height: auto;
}
.login-view .panel.narrow {
  color: #172c45;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.stats strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
}
.confirm-dialog {
  width: min(92vw, 460px);
  max-height: 90vh;
  overflow: auto;
  border: 0;
  border-radius: 16px;
  padding: 24px;
}
.confirm-dialog::backdrop {
  background: #102034bb;
}
.danger {
  background: #a51e32;
  color: white;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check-label input {
  width: 22px;
  min-height: 22px;
}
dt {
  font-weight: 700;
  margin-top: 12px;
}
dd {
  margin-left: 0;
}
:focus-visible {
  outline: 3px solid #2683ff;
  outline-offset: 3px;
}
.brand .official-logo {
  width: 180px;
  height: auto;
  background: white;
  padding: 6px;
  border-radius: 8px;
}
.login-intro > .official-logo {
  width: min(100%, 420px);
  height: auto;
  background: white;
  padding: 16px;
  border-radius: 14px;
}
[hidden] {
  display: none !important;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 750;
  color: #47736e;
  margin: 0 0 10px;
}
.brand .brand-wordmark {
  font-size: 19px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.brand .brand-wordmark span {
  font-size: 10px;
  letter-spacing: 3px;
  margin-top: 4px;
}
.full {
  width: 100%;
}
.login-view {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 15% 45%, #174b46 0, transparent 55%),
    radial-gradient(ellipse at 95% 20%, #142f44 0, transparent 55%), #0d1b22;
  color: #fff;
}
.login-view header {
  background: transparent;
  border-bottom: 1px solid #ffffff15;
}
.login-view .brand,
.login-view footer a {
  color: #ddfff6;
}
.login-view .tagline {
  color: #a7bbb8;
}
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  min-height: 65vh;
  padding: 25px 0;
}
.login-intro h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin: 20px 0;
}
.login-intro p:not(.eyebrow),
.login-intro small {
  color: #b0c8c4;
}
.login-intro .eyebrow {
  color: #75e9d2;
  margin-top: 24px;
}
.login-panel {
  color: #183238;
  padding: 30px;
  border: 1px solid #a4ead428;
  box-shadow: 0 24px 80px #0003;
  border-radius: 18px;
}
.signal-line {
  height: 2px;
  width: 96px;
  background: linear-gradient(90deg, #6df9d5, transparent);
  margin: 30px 0;
}
.login-view footer {
  color: #b0c8c4;
}
.login-view .install-help {
  display: none;
}
.physical-code {
  font-family: ui-monospace, monospace;
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.code-label {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.5px;
}
.badge.blocked {
  background: #f7e9e9;
  color: #942e35;
}
.chip-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.plate-line {
  padding: 16px 0;
  border-bottom: 1px solid #e3ece9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.plate-line:last-child {
  border-bottom: 0;
}
.plate-line p {
  margin: 6px 0 0;
}
.plate-line .actions {
  margin: 0;
}
.seller-group summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.seller-group summary span {
  font-size: 14px;
  color: #52675d;
}
.lot-counts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.lot-counts div {
  padding: 12px;
  border-radius: 8px;
  background: #f4f8f7;
}
.lot-counts span {
  font-size: 12px;
  color: #52675d;
  display: block;
}
.lot-counts strong {
  font-size: 25px;
  letter-spacing: -0.7px;
}
.batch-card details {
  margin-top: 12px;
  font-size: 13px;
}
.match-panel {
  background: #eef8f4;
  border: 1px solid #b5d7c9;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.install-help {
  max-width: 620px;
  margin-top: 12px;
}
#install-app {
  margin-left: 16px;
}
.client-card {
  border-top: 3px solid #d3ece4;
}
@media (max-width: 650px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding: 0;
  }
  .login-intro {
    padding: 8px 4px;
  }
  .login-intro > .official-logo {
    width: min(100%, 300px);
    height: auto;
  }
  .login-intro h1 {
    font-size: 32px;
    margin: 12px 0;
  }
  .login-intro .eyebrow {
    margin-top: 10px;
  }
  .login-intro small,
  .signal-line {
    display: none;
  }
  .login-panel {
    padding: 22px;
  }
  .lot-counts {
    grid-template-columns: repeat(2, 1fr);
  }
  .plate-line {
    align-items: stretch;
  }
  .plate-line .actions {
    width: 100%;
  }
  .tagline {
    display: none;
  }
  main {
    padding-bottom: 16px;
  }
  .brand .brand-wordmark {
    font-size: 17px;
  }
}
.brand span {
  font-size: 12px;
  letter-spacing: 2px;
  display: block;
}
.tagline {
  font-size: 13px;
  color: #60736a;
}
nav {
  max-width: 1000px;
  margin: 16px auto 0;
  padding: 0 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
nav button {
  min-height: 44px;
  background: white;
  color: var(--green);
  border: 1px solid #cbd8d0;
}
nav button.selected {
  background: var(--green);
  color: white;
}
main {
  max-width: 1000px;
  margin: 24px auto;
  padding: 0 18px 32px;
}
h1 {
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 10px;
}
h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
p {
  margin: 8px 0 16px;
}
.muted,
small {
  color: #52675d;
}
.panel,
.card {
  background: white;
  border: 1px solid #dce4df;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
}
.narrow {
  max-width: 470px;
  margin: 40px auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}
.stat {
  border: 1px solid #dce4df;
  background: white;
  border-radius: 10px;
  padding: 14px 20px;
  min-width: 135px;
}
.stat strong {
  font-size: 28px;
  display: block;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
button,
.button {
  font: inherit;
  cursor: pointer;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--green);
  color: white;
  padding: 10px 16px;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.secondary,
.button.secondary {
  background: #edf2ef;
  color: var(--green);
  border-color: #cbd8d0;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #d69e28;
  outline-offset: 2px;
}
label {
  display: block;
  font-weight: 600;
  margin: 0 0 16px;
}
input,
select {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 400;
  padding: 12px;
  border: 1px solid #aebfb5;
  border-radius: 8px;
  min-height: 48px;
  margin-top: 6px;
  background: white;
  color: #172c22;
}
input[type="checkbox"] {
  width: auto;
  display: inline;
  min-height: initial;
}
form .grid {
  gap: 0 18px;
}
.badge {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.5px;
  background: #e6f1e9;
  color: #1e5b3c;
  padding: 5px 9px;
  border-radius: 6px;
}
.badge.available {
  background: #fff3d8;
  color: #765008;
}
.badge.unassigned {
  background: #edf0ef;
  color: #526159;
}
.search {
  display: flex;
  gap: 8px;
  align-items: end;
  margin: 16px 0;
  flex-wrap: wrap;
}
.search label {
  flex: 1;
  min-width: 160px;
  margin: 0;
}
.search button {
  margin-bottom: 0;
}
#notice {
  max-width: 964px;
  margin: 0 auto;
  position: sticky;
  top: 8px;
  z-index: 3;
}
#notice:not(:empty) {
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid #b9d2c1;
  background: #e9f6ed;
}
#notice.error {
  background: #fff0ee;
  border-color: #e9b1aa;
  color: #8c231b;
}
.empty {
  padding: 32px;
  text-align: center;
  color: #52675d;
}
.hint {
  font-size: 13px;
  margin: 14px 0;
}
.secret {
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
  background: #fff3d8;
  padding: 16px;
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
td,
th {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #dce4df;
  padding: 8px;
  overflow-wrap: anywhere;
}
th {
  font-weight: 650;
}
a {
  color: var(--green);
}
.wrap {
  overflow-wrap: anywhere;
}
.audit {
  overflow: auto;
}
footer {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 18px;
  font-size: 13px;
}
details summary {
  cursor: pointer;
  min-height: 44px;
  padding: 8px 0;
}
.busy {
  opacity: 0.6;
}
@media (max-width: 540px) {
  header {
    padding: 16px 18px;
  }
  h1 {
    font-size: 23px;
  }
  .panel,
  .card {
    padding: 16px;
  }
  main {
    margin-top: 20px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .actions > * {
    flex: 1;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    flex: 1;
    min-width: 100px;
    padding: 12px;
  }
  .stat strong {
    font-size: 25px;
  }
  nav button {
    font-size: 14px;
    padding: 8px 10px;
  }
  .search button {
    width: 100%;
  }
  .tagline {
    margin-left: auto;
  }
  .audit table {
    min-width: 400px;
  }
}
