:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  color: #17343a;
  background: #f1f4f3;
  font-synthesis: none;
  --green: #14715c;
  --line: #dce5e1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: #112d33;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 4vw;
}
.brand {
  font-size: 28px;
  letter-spacing: 3px;
  font-weight: 850;
}
.brand span {
  color: #94d4ab;
}
.brand small {
  display: inline-block;
  margin-left: 20px;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 500;
}
.connection {
  font-size: 13px;
  color: #b8dfcd;
}
main {
  max-width: 1480px;
  margin: auto;
  padding: 32px 4vw;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 4px 0 22px;
}
h2 {
  font-size: 19px;
  margin: 0;
}
p {
  line-height: 1.5;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.9px;
  color: #6b817b;
  margin: 0 0 10px;
}
.title-row,
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.title-row {
  margin-bottom: 10px;
}
.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 3px 10px #17343a03;
}
.folders {
  align-self: start;
  position: sticky;
  top: 20px;
  padding: 20px;
}
.muted {
  font-size: 12px;
  color: #6f807c;
}
.badge {
  display: inline-block;
  background: #edf4ef;
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 12px;
  color: #426154;
}
button {
  border: 1px solid #cfdbd5;
  background: #f8faf8;
  border-radius: 8px;
  padding: 13px 17px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  color: #264b40;
  cursor: pointer;
  min-height: 46px;
}
button:hover {
  background: #e6eee8;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #81bca7;
  outline-offset: 2px;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
button.primary:hover {
  background: #105b4a;
}
button.quiet {
  border-color: transparent;
  background: transparent;
  font-size: 12px;
}
.small {
  padding: 8px 12px;
  font-size: 12px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin: 14px 0 8px;
}
input,
select,
textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid #cbd9d2;
  border-radius: 8px;
  font: inherit;
  color: #17343a;
  background: #fff;
  min-height: 48px;
}
textarea {
  min-height: 85px;
}
.folder-button {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 10px;
  background: white;
  position: relative;
}
.folder-button.selected {
  border-color: #62a68a;
  background: #edf7f0;
  box-shadow: inset 3px 0 #14715c;
}
.folder-button small {
  display: block;
  color: #71827c;
  margin-top: 6px;
  font-weight: 400;
}
.master-info {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.master-info button {
  width: 100%;
}
.scanner-area {
  display: grid;
  gap: 18px;
}
.active-folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid #7eb89a;
}
.active-folder p {
  margin-bottom: 0;
}
.scan-panel .section-title {
  margin-bottom: 16px;
}
.scan-row {
  display: flex;
  gap: 12px;
}
.scan-row input {
  font-size: 22px;
  font-weight: 600;
  min-width: 0;
  letter-spacing: 1px;
}
.scan-options {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.scan-options label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  margin: 0;
}
.scan-options select {
  width: auto;
  font-size: 12px;
}
.notice {
  padding: 13px 16px;
  background: #eef4f1;
  border: 1px solid #d9e8df;
  border-radius: 8px;
  margin: 18px 0;
  color: #335f4c;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.notice.success {
  background: #e8f5eb;
  border-color: #b4dcbc;
}
.notice.pending {
  background: #fff7df;
  border-color: #e9d49a;
  color: #775319;
}
.notice.error {
  background: #fff0ed;
  border-color: #edb8ad;
  color: #9c382d;
}
.roll-card {
  padding: 22px;
  background: #f6f9f7;
  border: 1px solid #e3eae5;
  border-radius: 10px;
  min-height: 180px;
}
.roll-card h2 {
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  overflow-wrap: anywhere;
}
.roll-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}
.roll-fields dl {
  margin: 0;
}
.roll-fields dt {
  font-size: 11px;
  color: #73867d;
  margin-bottom: 5px;
}
.roll-fields dd {
  font-size: 17px;
  font-weight: 650;
  margin: 0;
  overflow-wrap: anywhere;
}
.timing {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #7c8c84;
  margin-top: 14px;
}
.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.counters > div {
  background: #e5eee8;
  padding: 19px;
  border-radius: 10px;
}
.counters > div:nth-child(2) {
  background: #f3ecdb;
}
.counters > div:nth-child(3) {
  background: #e7ebed;
}
.counters strong {
  font-size: 30px;
  display: block;
}
.counters span {
  font-size: 11px;
  color: #597165;
}
.record {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.record-code {
  font-size: 17px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.record-meta {
  font-size: 12px;
  color: #71827a;
  line-height: 1.6;
}
.record-actions {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.record.retired {
  opacity: 0.65;
}
.queue-item {
  background: #fff7e4;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.queue-item.error {
  background: #fff0ed;
}
.empty {
  text-align: center;
  color: #8a9991;
  padding: 26px;
  font-size: 13px;
}
.login {
  max-width: 440px;
  margin: 9vh auto;
}
.login h1 {
  font-size: 30px;
  line-height: 1.2;
}
.login button {
  width: 100%;
  margin-top: 18px;
}
dialog {
  width: min(600px, 94vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  color: #17343a;
}
dialog::backdrop {
  background: #112d3377;
}
dialog p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
dialog pre {
  white-space: pre-wrap;
  font-size: 11px;
  background: #f4f7f5;
  padding: 12px;
  overflow-wrap: anywhere;
}
footer {
  max-width: 1480px;
  margin: 0 auto;
  padding: 25px 4vw;
  font-size: 11px;
  color: #83928a;
  display: flex;
  justify-content: space-between;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
  }
  .panel {
    padding: 18px;
  }
  .scan-row {
    gap: 8px;
  }
  .brand small {
    display: none;
  }
  .record {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  main {
    padding: 22px 16px;
  }
  .title-row {
    align-items: flex-start;
  }
  h1 {
    font-size: 26px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .folders {
    position: static;
  }
  .folders #folderList {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }
  .folder-button {
    min-width: 180px;
  }
  .master-info {
    margin-top: 15px;
  }
  .roll-fields {
    grid-template-columns: repeat(2, 1fr);
  }
  .scan-row button {
    padding: 12px;
  }
  .scan-row input {
    font-size: 20px;
  }
  .counters {
    gap: 7px;
  }
  .counters > div {
    padding: 13px;
  }
  .active-folder {
    align-items: flex-start;
    gap: 10px;
  }
  .timing {
    flex-direction: column;
  }
  .login {
    margin: 35px 16px;
  }
  .title-row .badge {
    max-width: 150px;
  }
  .scan-options button {
    padding: 8px;
  }
  .roll-card h2 {
    font-size: 30px;
  }
}

.persistent-context {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #173f3a;
  color: #f1faf5;
  padding: 13px 18px;
  border-radius: 9px;
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 4px 12px #112d331a;
}
.folders {
  top: 75px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 9px;
  overflow-wrap: anywhere;
}
#historyList article {
  margin: 20px 0;
}
#historyList table {
  table-layout: fixed;
}
@media (max-width: 700px) {
  .persistent-context {
    font-size: 11px;
    padding: 10px 12px;
  }
  .folders {
    position: static;
  }
}
