:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, "Noto Sans TC", sans-serif;
  color: #233637;
  background: #f3f6f5;
  --accent: #175651;
  --border: #c8d6d3;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; }
a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid #29847b;
  outline-offset: 2px;
}
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  background: #123b39;
  color: #fff;
  padding: .85rem clamp(1rem, 4vw, 3rem);
}
.identity, nav, .controls, .date-range { display: flex; align-items: center; gap: .7rem; }
.identity strong { font-size: 1.22rem; letter-spacing: .02em; }
.identity span, .vendor { color: #d0e5df; }
nav { flex-wrap: wrap; }
nav a { color: #fff; }
nav button.quiet { color: #fff; background: transparent; border-color: #71918d; }
main { max-width: 112rem; padding: 1.5rem clamp(1rem, 4vw, 3rem) 3rem; margin: auto; }
main.login { max-width: 30rem; padding-top: clamp(2rem, 10vh, 7rem); }
h1 { margin: 0 0 1rem; font-size: clamp(1.4rem, 3vw, 1.9rem); }
h2 { font-size: 1.2rem; margin: 1.7rem 0 .65rem; }
.panel { padding: 1.2rem; border: 1px solid var(--border); border-radius: .65rem; background: white; }
.stack { display: grid; gap: 1rem; }
.menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .8rem; max-width: 39rem; }
.menu a { text-decoration: none; }
.menu a:hover, button.quiet:hover { background: #e4f1ed; }
nav button.quiet:hover { background: #22504b; }
.menu span { display: block; color: #4c6361; font-size: .875rem; margin-top: .25rem; }
.conditions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .9rem; align-items: end; }
label, legend { font-weight: 550; }
fieldset { border: 0; margin: 0; min-inline-size: 0; padding: 0; }
legend { padding: 0; }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  display: block; min-width: 0; width: 100%; padding: .44rem .5rem;
  border: 1px solid #9eb1ae; border-radius: .3rem; color: inherit; background: #fff;
  font: inherit; font-weight: normal;
}
select:disabled { background: #eef3f2; }
.required { color: #a13526; }
button {
  color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: .35rem;
  padding: .42rem .8rem; font: inherit; cursor: pointer;
}
button.quiet { color: var(--accent); border-color: var(--border); background: #fff; }
button.danger { background: #9b3022; border-color: #9b3022; }
button:disabled { opacity: .5; cursor: default; }
.controls { margin: 1rem 0 .7rem; flex-wrap: wrap; }
.clear-choice { display: block; margin: .75rem 0; }
.supplier-name { color: #4c6361; }
.message { border-radius: .35rem; padding: .6rem .8rem; color: #154e44; background: #deefe8; }
.error { color: #8a2c20; background: #fae8e4; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: .35rem; }
table { border-collapse: collapse; width: 100%; background: #fff; font-size: .9rem; }
th, td { padding: .5rem; border-bottom: 1px solid #dde7e5; vertical-align: top; text-align: left; }
th { background: #e3eeeb; white-space: nowrap; }
tbody tr:nth-child(even) { background: #f7faf9; }
.report-table { min-width: 67rem; }
.report-table td:nth-child(13) { white-space: pre-wrap; }
.remark-table { min-width: 56rem; }
.remark-table td:nth-child(10) { width: 22%; min-width: 13rem; }
textarea { resize: vertical; }
.changed { font-size: .8rem; color: #4c6361; white-space: nowrap; }
