:root {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  color: #233c35;
  background: #f5f7f6;
  color-scheme: light;
  --teal: #176b52;
  --line: #e5ebe7;
  --muted: #75857c;
}
* {
  box-sizing: border-box;
}
.item-select {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}
.item-select input[type="checkbox"] {
  width: 19px;
  height: 19px;
  min-height: 19px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--teal);
}
.claim-bar {
  position: sticky;
  top: 8px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #f0f6ee;
  border: 1px solid #dce8da;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}
.bulk-line,
.stock-entry {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.stock-entry:only-child .line-heading {
  display: none;
}
.stock-entry {
  margin-bottom: 18px;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: var(--teal);
  text-decoration: none;
}
button {
  min-height: 42px;
  padding: 10px 19px;
  border: 0;
  border-radius: 7px;
  background: var(--teal);
  color: white;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
button:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary,
.link-button {
  background: white;
  border: 1px solid #d8e2db;
  color: #466052;
}
.text-btn {
  background: transparent;
  color: var(--teal);
  padding: 8px;
  font-size: 14px;
  font-weight: 400;
}
.danger {
  background: #fff3ef;
  color: #ad5140;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #bba253;
  outline-offset: 3px;
}
.appbar {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 17px max(24px, calc((100% - 1040px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #254a39;
  font-size: 21px;
  font-weight: 700;
  white-space: nowrap;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: #e8f1e8;
  color: #31714e;
  border-radius: 9px;
  font-size: 21px;
}
.identity {
  display: flex;
  gap: 10px;
  align-items: center;
}
.identity label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.identity select {
  width: 205px;
  font-size: 14px;
  padding: 8px 10px;
  min-height: 38px;
  background-color: #f9fbf9;
}
#identityInfo {
  display: none;
}
.workspace {
  max-width: 1088px;
  padding: 0 24px 20px;
  margin: auto;
}
nav {
  display: flex;
  overflow-x: auto;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
nav a {
  flex-shrink: 0;
  color: #76867c;
  padding: 22px 2px 16px;
  border-bottom: 3px solid transparent;
  font-size: 15px;
}
.management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.module-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  margin: 0;
  min-height: 190px;
  transition: border-color 0.15s;
}
.module-card:hover {
  border-color: #87ad91;
}
.module-card h2 {
  font-size: 18px;
}
.module-card strong {
  display: block;
  margin-top: 12px;
  color: var(--teal);
  font-size: 22px;
}
.module-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0;
}
.module-card > span {
  color: var(--teal);
  font-size: 14px;
  margin-top: auto;
}
@media (max-width: 700px) {
  .management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .module-card {
    min-height: 180px;
    padding: 16px;
  }
  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 70%;
    gap: 8px 14px;
  }
  .header-actions > a,
  .header-actions > button {
    white-space: nowrap;
  }
}
nav a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  font-weight: 600;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
}
h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: 0.5px;
}
h2 {
  margin: 0;
  font-size: 19px;
}
h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
p {
  line-height: 1.8;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.notice-link {
  font-size: 14px;
  color: #63796c;
}
#noticeCount {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  background: #eaf1eb;
  margin-left: 4px;
  font-size: 12px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 24px;
  margin-bottom: 16px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}
.intro p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}
.toolbar input {
  flex: 1;
}
.toolbar select {
  width: 130px;
}
input,
select,
textarea {
  border: 1px solid #dce5dd;
  border-radius: 7px;
  padding: 11px 12px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  color: #2d4939;
  background: white;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2375857c' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #95bba1;
  outline-offset: 1px;
}
input[readonly] {
  background: #f6f9f6;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
input[type="file"] {
  font-size: 14px;
  padding: 10px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  padding: 13px 12px;
  font-size: 13px;
  color: #819084;
  font-weight: 400;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 22px 12px;
  border-bottom: 1px solid #eef2ee;
  font-size: 15px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td small {
  display: block;
  color: #889889;
  margin-top: 5px;
  font-size: 12px;
}
.inventory-table th:first-child,
.inventory-table td:first-child {
  padding-left: 0;
}
.inventory-table td:last-child {
  text-align: right;
  padding-right: 0;
  width: 115px;
}
.inventory-table td:last-child button {
  min-width: 78px;
}
.inventory-table td.spec {
  color: #7a8b7d;
  font-size: 14px;
}
.num {
  font-variant-numeric: tabular-nums;
  font-size: 21px;
  font-weight: 600;
}
.unit {
  font-size: 13px;
  color: #7e9080;
  font-weight: 400;
}
.available {
  color: #226b48;
}
.zero {
  color: #98a397;
}
.stock-help {
  margin-bottom: 0;
}
.hint,
.request-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.page-description {
  color: #77897c;
  font-size: 14px;
  margin: -6px 0 22px;
}
.empty {
  text-align: center;
  color: #849686;
  padding: 40px 12px;
}
.empty h3 {
  font-size: 15px;
  font-weight: 400;
}
.disclosure {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.disclosure summary {
  color: #718675;
  cursor: pointer;
  font-size: 14px;
  width: fit-content;
  line-height: 1.8;
}
.disclosure[open] > summary {
  margin-bottom: 18px;
}
.history-group {
  margin: 30px 0 20px;
  padding: 20px 0 0;
}
.history-group > .panel {
  margin-top: 16px;
}
.demo-tools {
  border: 0;
  margin: 8px 0 0;
  padding: 0;
}
.demo-tools summary {
  color: #a0ada1;
  font-size: 12px;
}
.demo-tools[open] > summary {
  margin: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.field {
  display: grid;
  align-content: start;
  gap: 9px;
  font-size: 14px;
}
.wide {
  grid-column: 1/-1;
}
.field + .field {
  margin-top: 0;
}
.disclosure > .field {
  margin-bottom: 16px;
}
.line-form {
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--line);
}
.line-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
}
.line-heading h3 {
  font-size: 15px;
}
.line-form:only-child .line-heading {
  display: none;
}
.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding-top: 24px;
}
.apply-panel {
  max-width: 720px;
  margin: auto;
}
.apply-panel > .hint {
  margin-top: 0;
}
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 7px;
  min-height: 42px;
  font-size: 14px;
}
.request-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.request-meta {
  display: block;
  margin-top: 5px;
}
.badge {
  display: inline-block;
  white-space: nowrap;
  padding: 5px 9px;
  font-size: 12px;
  border-radius: 5px;
  background: #edf3ed;
  color: #5e7f62;
}
.badge.wait {
  background: #f7f1df;
  color: #907845;
}
.badge.reject {
  background: #fff0ec;
  color: #ad6653;
}
.badge.done {
  background: #eaf3e9;
  color: #49794d;
}
.item-summary {
  color: #7c8e7f;
  font-size: 14px;
  margin: 15px 0 0;
}
.request-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.request-body td {
  padding: 15px 10px;
  font-size: 14px;
}
.request-body th {
  font-size: 12px;
}
.audit {
  color: #7b8f7e;
  line-height: 1.9;
  font-size: 13px;
  border-left: 2px solid #dbe7da;
  padding-left: 12px;
  margin: 15px 0;
}
.audit b {
  color: #507656;
}
.note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 430px;
  color: #7b8f7e;
  font-size: 14px;
  line-height: 1.8;
}
.attachments {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}
.attachment {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 5px;
  object-fit: cover;
  cursor: zoom-in;
}
.arrival {
  border: 1px solid #e5ece1;
  border-radius: 8px;
  background: #f8fbf6;
  padding: 18px;
  margin-top: 20px;
}
.arrival p {
  font-size: 14px;
}
.arrival h3 {
  font-size: 15px;
}
.record-card .hint {
  margin: 6px 0;
}
.record-quantity {
  font-weight: 400;
  font-size: 16px;
  color: #638267;
  margin-left: 10px;
}
.notice {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.notice:last-child {
  border: 0;
}
.notice time {
  color: #8e9d8e;
  font-size: 12px;
}
.notice h3 {
  font-size: 16px;
  margin-top: 8px;
}
.notice p {
  font-size: 14px;
  color: #7b8c7d;
  white-space: pre-wrap;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 24px 2px 8px;
  font-size: 12px;
  color: #9aa69a;
}
dialog {
  padding: 0;
  border: 0;
  border-radius: 13px;
  max-width: 540px;
  width: calc(100% - 32px);
  max-height: 90vh;
  color: #294334;
  box-shadow: 0 20px 80px #1b3c3233;
}
dialog::backdrop {
  background: #18312655;
}
.dialog-inner {
  padding: 25px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  font-size: 20px;
}
.dialog-head button {
  font-size: 24px;
  padding: 0 8px;
  font-weight: 400;
  min-height: 32px;
}
.dialog-inner .actions {
  justify-content: flex-end;
  margin-top: 22px;
}
.selected-item {
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 8px;
  background: #f2f7ef;
}
.selected-item p {
  font-size: 14px;
  margin: 5px 0;
  color: #6c856a;
}
.qr-image {
  display: block;
  margin: 10px auto;
  width: min(260px, 100%);
  height: auto;
}
.qr-url {
  font-size: 13px;
  text-align: center;
  word-break: break-all;
}
.picture-view {
  display: block;
  max-width: 100%;
  margin: auto;
}
.callout {
  background: #f0f6ed;
  color: #648461;
  padding: 15px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 18px;
}
.inline-error {
  color: #ae5a45;
  margin-top: 15px;
  font-size: 14px;
}
#errorBanner {
  padding: 15px;
  background: #fff0ea;
  color: #ae5a45;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: #28503a;
  color: white;
  padding: 14px 22px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10;
}
@media (max-width: 700px) {
  .appbar {
    padding: 15px 16px;
    gap: 10px;
  }
  .brand {
    font-size: 18px;
    gap: 8px;
  }
  .brand-icon {
    width: 29px;
    height: 29px;
    font-size: 18px;
  }
  .identity label {
    display: none;
  }
  .identity select {
    width: 175px;
    max-width: 46vw;
    font-size: 13px;
  }
  .workspace {
    padding: 0 16px 14px;
  }
  nav {
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 24px;
  }
  nav a {
    padding: 18px 0 13px;
    font-size: 15px;
  }
  header {
    margin-bottom: 20px;
  }
  h1 {
    font-size: 23px;
  }
  .header-actions {
    gap: 12px;
  }
  .panel {
    padding: 19px 16px;
  }
  .intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .intro .actions {
    width: 100%;
  }
  .intro .actions button:last-child {
    flex: 1;
  }
  button {
    font-size: 14px;
    padding: 10px 15px;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar input {
    font-size: 14px;
  }
  .toolbar select {
    width: 100px;
    font-size: 14px;
  }
  .inventory-table,
  .inventory-table tbody {
    display: block;
  }
  .inventory-table thead {
    display: none;
  }
  .inventory-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
    row-gap: 9px;
    column-gap: 10px;
  }
  .inventory-table tr:last-child {
    border: 0;
  }
  .inventory-table td {
    border: 0;
    padding: 0;
    white-space: normal;
  }
  .inventory-table td:first-child {
    grid-column: 1;
    grid-row: 1;
    font-size: 16px;
  }
  .inventory-table td.spec {
    grid-column: 1;
    grid-row: 2;
    font-size: 13px;
  }
  .inventory-table td.num {
    grid-column: 1;
    grid-row: 3;
    font-size: 20px;
  }
  .inventory-table td.num::before {
    content: "可领 ";
    font-size: 12px;
    font-weight: 400;
    color: #879a86;
  }
  .inventory-table td:last-child {
    grid-column: 2;
    grid-row: 1/4;
    align-self: center;
    width: auto;
  }
  .form-grid {
    gap: 15px;
  }
  .form-footer {
    gap: 8px;
  }
  .form-footer .actions {
    gap: 7px;
  }
  .form-footer .text-btn {
    padding-left: 0;
    font-size: 13px;
  }
  .link-button {
    padding: 10px;
    font-size: 13px;
  }
  .request-head {
    gap: 10px;
  }
  .request-head h3 {
    font-size: 16px;
  }
  .request-meta {
    font-size: 12px;
  }
  .badge {
    font-size: 12px;
    padding: 4px 6px;
  }
  .dialog-inner {
    padding: 22px 18px;
  }
  .dialog-head h2 {
    font-size: 19px;
  }
  .arrival {
    padding: 14px;
  }
  .arrival .request-head {
    display: block;
  }
  footer {
    font-size: 11px;
  }
}
@media print {
  .appbar,
  .workspace,
  .actions,
  .dialog-head button,
  .dialog-inner > p,
  .dialog-inner > .field {
    display: none !important;
  }
  dialog[open] {
    position: static;
    width: 100%;
    max-width: none;
    max-height: none;
    box-shadow: none;
  }
  dialog::backdrop {
    display: none;
  }
}
@media (max-width: 700px) {
  .module-card {
    padding: 16px;
  }
  .header-actions {
    gap: 8px 12px;
  }
}
