:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #5f5f5f;
  --line: #e5e5e5;
  --surface: #fafafa;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fff;
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p, dl, dd { margin: 0; }
p { color: var(--muted); font-size: .875rem; line-height: 1.6; }
.wrap { width: min(100% - 48px, 1120px); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); }
.site-bar {
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-block: 9px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: .875rem; font-weight: 650; white-space: nowrap; }
.brand-mark {
  width: 27px;
  height: 27px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  padding-bottom: 6px;
  border-radius: 6px;
  background: var(--ink);
}
.brand-mark i { width: 3px; height: 6px; border-radius: 1px; background: #fff; }
.brand-mark i:nth-child(2) { height: 10px; }
.brand-mark i:nth-child(3) { height: 14px; }
.actions { display: flex; gap: 8px; }

button, input, select {
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #929292;
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input, select { width: 100%; font-weight: 400; }
button { padding-inline: 13px; cursor: pointer; font-size: .875rem; font-weight: 600; }
button:hover:not(:disabled) { background: #f0f0f0; }
button:disabled { background: var(--surface); color: #757575; border-color: var(--line); cursor: default; }
.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.primary:hover:not(:disabled) { background: #383838; }
.quiet { border-color: transparent; color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
label { font-size: .875rem; font-weight: 600; }
.field { display: grid; gap: 6px; min-width: 0; }

h1 { font-size: clamp(1.7rem, 5vw, 2.75rem); font-weight: 690; line-height: 1.25; letter-spacing: -.035em; }
h2 { font-size: 1.125rem; font-weight: 650; }
main { padding-bottom: 48px; }
.access-panel {
  max-width: 412px;
  margin: clamp(40px, 12vh, 120px) auto 0;
  padding: clamp(18px, 5vw, 32px);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 5px #00000006;
}
.access-panel h1 { font-size: clamp(1.2rem, 6vw, 1.55rem); }
.access-panel p { margin-top: 10px; }
.access-panel form { display: grid; gap: 8px; margin-top: 23px; }
.access-panel form button, #retry { margin-top: 6px; }
.feedback { overflow-wrap: anywhere; }
.feedback:empty { margin: 0; }

.dashboard-header { margin: 48px 0 28px; }
.dashboard-header p { margin-top: 10px; }
.time-zone { margin-left: .6em; }
.feedback:not(:empty) + .summary { margin-top: 12px; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 14px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.metrics > div { padding: 16px 20px; }
.metrics > div + div { border-left: 1px solid var(--line); }
.metrics dt { color: var(--muted); font-size: .875rem; line-height: 1.45; }
.metrics dd { margin-top: 5px; font-size: clamp(1.4rem, 4.5vw, 2.3rem); font-weight: 650; overflow-wrap: anywhere; }
time, dd, td a, #page-indicator { font-variant-numeric: tabular-nums; }

.inventory { margin-top: 37px; }
#filters {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
}
#filters select { padding-right: 3px; }
.result-message { margin: 14px 0 8px; }
.number-list { border: 1px solid var(--line); border-radius: 10px; }

table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .875rem; }
th, td { padding: 11px 14px; text-align: left; overflow-wrap: anywhere; }
th { border-bottom: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; }
th:first-child { width: 25%; border-top-left-radius: 9px; }
th:nth-child(2) { width: 31%; }
th:last-child { border-top-right-radius: 9px; }
tbody tr + tr { border-top: 1px solid var(--line); }
tbody tr:hover { background: var(--surface); }
tbody tr:last-child td:first-child { border-bottom-left-radius: 9px; }
tbody tr:last-child td:last-child { border-bottom-right-radius: 9px; }
td time { display: flex; flex-wrap: wrap; gap: 1px 7px; color: var(--muted); }
td a { display: inline-flex; align-items: center; min-height: 24px; color: var(--ink); font-weight: 650; text-underline-offset: 3px; }
.category {
  display: inline-block;
  max-width: 100%;
  margin: 2px 4px 2px 0;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font-size: .8125rem;
  line-height: 1.35;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
#page-indicator { color: var(--muted); font-size: .8125rem; }

@media (max-width: 670px) {
  .wrap { width: calc(100% - 24px); }
  .site-bar { min-height: 59px; }
  .dashboard-header { margin: 34px 0 23px; }
  .inventory { margin-top: 28px; }
  .metrics > div { padding: 10px 8px; }
  .metrics dt { font-size: .75rem; }
  #filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #filters .search-field, #filters button { grid-column: 1 / -1; }
  #filters select { padding-left: 6px; }
  th, td { padding: 8px 5px; font-size: .75rem; }
  th:first-child { width: 31%; }
  th:nth-child(2) { width: 21%; }
  td time { display: grid; font-size: .7rem; }
  .category { margin-right: 0; padding-inline: 3px; font-size: .6875rem; }
  .pagination { padding-inline: 8px; }
}
