.ocr-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 360px;
  overflow: auto;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  align-self: flex-start;
}
:root {
  font-family:
    system-ui,
    -apple-system,
    "Microsoft YaHei",
    sans-serif;
  color: #203b35;
  background: #f3f5f2;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: #153e35;
  color: white;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
header strong {
  font-size: 22px;
}
small {
  display: block;
  font-size: 12px;
  opacity: 0.8;
}
#layout {
  display: flex;
  min-height: 90vh;
}
nav {
  width: 200px;
  flex-shrink: 0;
  background: #fff;
  padding: 20px 12px;
  border-right: 1px solid #dde5de;
}
nav button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 4px 0;
  background: transparent;
  color: #36534a;
}
nav button.active {
  background: #e1ede5;
  color: #153e35;
  font-weight: bold;
}
main {
  width: calc(100% - 200px);
  max-width: 1500px;
  padding: 24px 32px 70px;
}
h1 {
  font-size: 25px;
  margin: 0 0 4px;
}
h2 {
  font-size: 18px;
}
p {
  color: #5a7067;
}
button,
.download {
  background: #1d624d;
  color: white;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  padding: 10px 16px;
  font: inherit;
  min-height: 44px;
}
button:hover {
  filter: brightness(0.92);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.secondary {
  background: #e8eee8;
  color: #254c3c;
}
button.danger {
  background: #8a362e;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 14px 0;
}
.card {
  background: white;
  border: 1px solid #dfe6dd;
  border-radius: 14px;
  padding: 22px;
  margin: 16px 0;
  box-shadow: 0 3px 12px #173e3504;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.metric {
  border-left: 3px solid #c78d48;
}
.metric strong {
  font-size: 27px;
  display: block;
  margin: 6px 0;
}
.notice {
  background: #fff6e5;
  border: 1px solid #f0ddad;
  border-radius: 10px;
  padding: 14px;
  color: #735023;
  margin: 12px 0;
}
#message:empty {
  display: none;
}
#message {
  position: sticky;
  top: 10px;
  z-index: 3;
  background: #fff0e9;
  color: #7d3420;
  padding: 12px;
  border: 1px solid #e4baa2;
  border-radius: 8px;
  white-space: pre-wrap;
}
label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
  min-width: 130px;
}
input,
select,
textarea {
  font: inherit;
  border: 1px solid #c9d5ca;
  background: white;
  border-radius: 7px;
  padding: 9px;
  min-height: 44px;
  max-width: 100%;
  color: #203b35;
}
textarea {
  min-height: 80px;
}
form .fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
form button {
  margin-top: 16px;
}
.scroll {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  white-space: nowrap;
}
th {
  background: #f1f5ef;
  color: #55705e;
  text-align: left;
}
td,
th {
  padding: 11px 14px;
  border-bottom: 1px solid #e7ece5;
}
td {
  max-width: 400px;
  white-space: normal;
  min-width: 90px;
  overflow-wrap: anywhere;
}
details summary {
  cursor: pointer;
  padding: 6px;
  color: #32614b;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f5f7f3;
  padding: 12px;
  border-radius: 8px;
}
a {
  color: #24644d;
}
.login {
  max-width: 460px;
  margin: 45px auto;
}
.badge {
  background: #e8f0e4;
  padding: 4px 8px;
  border-radius: 10px;
}
.route-item {
  padding: 14px;
  border-bottom: 1px solid #e7ece5;
}
.route-item .toolbar {
  margin: 6px 0;
}
footer {
  font-size: 12px;
  color: #748273;
  margin-top: 24px;
}
@media (max-width: 760px) {
  header {
    padding: 15px;
  }
  header strong {
    font-size: 18px;
  }
  header small {
    font-size: 11px;
  }
  #layout {
    display: block;
  }
  nav {
    width: 100%;
    display: flex;
    overflow: auto;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 7px;
    border: 0;
    border-bottom: 1px solid #dce5d9;
  }
  nav button {
    width: auto;
    white-space: nowrap;
    margin: 0 3px;
    padding: 8px 13px;
  }
  main {
    width: 100%;
    padding: 18px 14px calc(40px + env(safe-area-inset-bottom));
  }
  .card {
    padding: 16px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric strong {
    font-size: 22px;
  }
  h1 {
    font-size: 22px;
  }
  .toolbar > * {
    flex: 1;
    min-width: 110px;
  }
  form .fields {
    grid-template-columns: 1fr;
  }
  .login {
    margin: 22px auto;
  }
  td,
  th {
    padding: 9px;
  }
  #account {
    font-size: 12px;
  }
  #account button {
    padding: 5px 10px;
  }
}
