:root {
  --ink: #213a32;
  --muted: #586c62;
  --paper: #f7f7f1;
  --green: #286044;
  --line: #d6ded5;
  --accent: #e8efdc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Noto Sans TC",
    sans-serif;
}
::selection {
  background: #d1e5ba;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: var(--green);
  color: white;
  padding: 11px 20px;
  border-radius: 7px;
  font-weight: 600;
}
button:hover {
  background: #194b32;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.secondary,
.link {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--line);
}
button.danger {
  background: #a33c31;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b78b26;
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #adbbae;
  border-radius: 6px;
  padding: 11px;
  background: #fff;
  color: var(--ink);
  caret-color: var(--green);
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0;
}
label input,
label textarea,
label select {
  display: block;
  margin-top: 6px;
}
h1 {
  font-size: 34px;
  line-height: 1.35;
  margin: 0 0 12px;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 23px;
  margin: 26px 0 12px;
}
p {
  color: var(--muted);
}
header {
  height: 86px;
  border-bottom: 1px solid var(--line);
  padding: 20px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
}
.brand {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.025em;
}
.brand span {
  font-size: 13px;
  margin-left: 12px;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 86px);
}
nav {
  padding: 32px 20px;
  border-right: 1px solid var(--line);
}
nav button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--muted);
  margin-bottom: 8px;
}
nav button.active {
  background: var(--accent);
  color: var(--ink);
}
nav p {
  font-size: 12px;
  margin-top: 64px;
}
main {
  padding: 44px 48px;
  max-width: 1300px;
  width: 100%;
  min-width: 0;
}
.heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}
.heading p {
  margin: 0;
}
.empty {
  border-block: 1px solid var(--line);
  padding: 64px 16px;
  text-align: center;
}
.empty h2 {
  margin-top: 0;
}
.form {
  max-width: 650px;
  background: white;
  padding: 24px 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 22px;
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 14px;
}
th {
  font-size: 12px;
  color: var(--muted);
  background: #edf1e9;
}
td,
th {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
td {
  font-variant-numeric: tabular-nums;
}
tr:last-child td {
  border: 0;
}
td button {
  padding: 6px 12px;
  font-size: 13px;
}
.badge {
  display: inline-block;
  font-size: 12px;
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 30px;
  white-space: nowrap;
}
.badge.closed {
  background: #edf0ec;
  color: var(--muted);
}
.banner {
  padding: 14px 20px;
  background: #f7ebcd;
  border: 1px solid #dbcda8;
  border-radius: 8px;
  margin-bottom: 24px;
  color: #65501d;
  font-size: 14px;
}
.detail {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
}
.summary {
  background: #eaf0e3;
  padding: 22px;
  border-radius: 12px;
  align-self: start;
}
.summary p {
  white-space: pre-wrap;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login > div {
  max-width: 520px;
  width: 100%;
  margin: auto;
  padding: 48px;
}
.login .brand {
  display: block;
  margin-bottom: 64px;
}
.login h1 {
  font-size: 38px;
}
.login form button {
  width: 100%;
  margin: 10px 0;
}
.login .link {
  border: 0;
  font-size: 14px;
  padding-left: 0;
}
.login aside {
  background: #dce5d2;
  display: grid;
  place-items: center;
  padding: 48px;
}
.paper {
  background: #fafbf6;
  padding: 52px;
  transform: rotate(-3deg);
  max-width: 430px;
  width: 100%;
}
.paper h2 {
  font-size: 42px;
  line-height: 1.4;
}
.paper hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #213a32;
  color: white;
  padding: 14px 24px;
  border-radius: 8px;
  max-width: 90%;
  z-index: 9;
}
[hidden] {
  display: none !important;
}
.small {
  font-size: 13px;
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  background: #edf1e9;
  padding: 20px;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
@media (max-width: 760px) {
  header {
    padding: 18px;
    height: 72px;
  }
  .brand span {
    display: none;
  }
  .layout {
    display: block;
  }
  nav {
    display: flex;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: auto;
    gap: 4px;
  }
  nav button {
    white-space: nowrap;
    width: auto;
    font-size: 14px;
    padding: 9px 12px;
    margin: 0;
  }
  nav p {
    display: none;
  }
  main {
    padding: 26px 18px;
  }
  h1 {
    font-size: 28px;
  }
  .heading {
    align-items: start;
  }
  .heading button {
    white-space: nowrap;
  }
  .detail {
    grid-template-columns: 1fr;
  }
  .form {
    padding: 20px;
  }
  .login {
    display: block;
  }
  .login > div {
    padding: 28px;
  }
  .login aside {
    display: none;
  }
  .login .brand {
    margin-bottom: 48px;
  }
  .login h1 {
    font-size: 34px;
  }
  td,
  th {
    padding: 14px;
  }
  table {
    min-width: 560px;
  }
}
button.secondary:hover,
.link:hover,
nav button:hover {
  background: #e0e9d8;
  color: #213a32;
}
.filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  align-items: end;
}
.filters label {
  flex: 1;
  min-width: 160px;
  margin: 0;
}
.order-strip {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  margin-bottom: 24px;
}
.pickup-qr {
  display: block;
  max-width: 100%;
  width: 280px;
  height: auto;
  margin: 24px 0;
  background: white;
}
#scan-video {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  margin-top: 20px;
  border-radius: 8px;
}
#profile-form {
  margin-top: 24px;
}
#scan-result {
  margin-top: 24px;
}
#content {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .heading {
    flex-wrap: wrap;
  }
  .filters {
    gap: 12px;
  }
  .filters label {
    min-width: 135px;
  }
  .order-strip {
    gap: 12px;
  }
  header #actor {
    max-width: 140px;
    font-size: 12px;
  }
  header #logout {
    padding: 8px 12px;
  }
  #order-list table {
    min-width: 780px;
  }
}
