:root {
  color-scheme: light;
  font: 15px/1.55 "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #20282b;
  background: #f3f4ef;
  --paper: #fffefb;
  --line: #dce0d7;
  --green: #173e34;
  --muted: #5c665f;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, p { margin: 0; }
h1, h2 { margin: 0; line-height: 1.25; }
h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); letter-spacing: -.035em; }
h2 { font-size: 1.08rem; }
button, input { font: inherit; }
button, a.secondary { border: 1px solid var(--line); background: var(--paper); color: var(--green);
  padding: .47rem .86rem; border-radius: 6px; text-decoration: none; cursor: pointer; white-space: nowrap; }
button:hover:not(:disabled), a.secondary:hover { background: #eaf0e9; }
button:disabled { opacity: .46; cursor: default; }
button.primary { background: var(--green); border-color: var(--green); color: white; font-weight: 650; }
button.primary:hover:not(:disabled) { background: #245647; }
button.quiet { background: transparent; }
input:not([type=checkbox]) { border: 1px solid #bdc8bd; border-radius: 6px; background: white; color: inherit;
  width: 100%; padding: .58rem .7rem; min-height: 40px; }
input[type=file] { width: min(100%, 24rem); }
input[type=checkbox] { accent-color: var(--green); }
:focus-visible { outline: 2px solid #3c806a; outline-offset: 3px; }
.brand { color: var(--green); font-size: .85rem; font-weight: 800; letter-spacing: .18em; }
.muted { color: var(--muted); margin-top: .35rem; }
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 1.2rem; }
.login-panel { width: min(100%, 390px); background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: clamp(1.4rem, 5vw, 2.4rem); box-shadow: 0 12px 45px #2941340c; }
.login-panel h1 { font-size: 1.6rem; margin: .9rem 0 1.35rem; }
.form { display: grid; gap: .95rem; }
label { display: grid; gap: .25rem; font-weight: 600; }
.bar { border-bottom: 1px solid var(--line); background: var(--paper); }
.bar-inner, .workspace { width: min(1220px, calc(100% - 2rem)); margin: auto; }
.bar-inner, .account, .section-head, .upload-panel, .pager, .confirm-actions {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap;
}
.bar-inner { min-height: 60px; }
.account { font-size: .9rem; color: var(--muted); gap: 1.1rem; }
.workspace { padding: 1.55rem 0 3rem; display: grid; gap: 1rem; }
.workspace > h1 { margin-bottom: .22rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: clamp(.8rem, 2vw, 1.3rem); min-width: 0; }
.upload-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 1rem 0 .7rem; }
.tabs button { border-color: transparent; }
.tabs button[aria-pressed=true] { background: #e3eee6; border-color: #c7d8cd; font-weight: 700; }
.tabs span { margin-left: .24rem; color: var(--muted); }
.table-wrap { overflow-x: auto; margin-top: .55rem; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: .63rem .52rem; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
td:last-child { white-space: normal; min-width: 7rem; overflow-wrap: anywhere; }
th { color: var(--muted); background: #edf1e9; font-weight: 650; font-size: .88rem; }
td button { padding: .2rem .5rem; text-align: left; white-space: normal; }
.actions { margin-top: .75rem; }
.confirm-actions label { display: flex; align-items: center; }
.confirm-actions input { width: min(220px,40vw); }
.audit { margin-top: .8rem; }
.audit summary { cursor: pointer; color: var(--green); }
.audit ul { padding-left: 1.2rem; margin-bottom: 0; }
.message { color: #234b2f; background: #e8f1e7; padding: .65rem .8rem; border-radius: 6px; }
.message.error { color: #8b2c23; background: #f9eee9; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 640px) {
  .workspace { padding-top: 1rem; }
  .confirm-actions label { align-items: flex-start; flex-direction: column; }
  .confirm-actions input { width: 100%; }
}
