:root {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: #172b3b;
  background: #f3f6fa;
  font-synthesis: none;
  line-height: 1.55;
  --accent: #176e83;
  --line: #dde5ec;
  --muted: #627586;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  min-height: 44px;
  border: 1px solid #cad8e2;
  border-radius: 10px;
  background: #fff;
  color: #203e50;
  padding: 9px 15px;
  cursor: pointer;
  touch-action: manipulation;
}
button:hover {
  background: #eef5f8;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #55b4d0;
  outline-offset: 3px;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
button.danger {
  color: #a53232;
  border-color: #e7bcbc;
}
button.quiet {
  background: transparent;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #bdccd7;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #172b3b;
}
textarea {
  resize: vertical;
  min-height: 140px;
}
label {
  display: grid;
  gap: 7px;
  font-weight: 600;
}
label .muted,
label small {
  font-weight: 400;
}
form {
  display: grid;
  gap: 18px;
}
a {
  color: var(--accent);
  text-decoration: none;
}
p {
  margin: 0 0 14px;
}
h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
h1 {
  font-size: 26px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 17px;
}
[hidden] {
  display: none !important;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1320px;
  margin: auto;
  padding: 22px 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #294759;
  min-width: 0;
  font-size: 13px;
}
.brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  background: var(--accent);
  color: #fff;
  border-radius: 14px;
  font-size: 22px;
}
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
}
.notice {
  border-radius: 10px;
  padding: 12px 16px;
  background: #e8f2f5;
  overflow-wrap: anywhere;
  margin-bottom: 20px;
  min-height: 0;
}
.notice:empty {
  display: none;
}
.notice.error {
  background: #fff0ef;
  color: #953329;
}
.notice.success {
  background: #e7f3ed;
  color: #216548;
}
.workspace {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
}
.navigation {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
  position: sticky;
  top: 18px;
}
.navigation button {
  border-color: transparent;
  background: transparent;
  text-align: left;
  white-space: nowrap;
}
.navigation button.active {
  background: #dcecf1;
  color: #115c70;
  font-weight: 700;
}
.content {
  min-width: 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 22px;
}
.section-heading p {
  margin: 0;
}
.muted {
  color: var(--muted);
}
.small,
small {
  font-size: 13px;
}
.eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat {
  margin: 0;
  padding: 20px;
}
.stat strong {
  display: block;
  font-size: 28px;
  line-height: 1.3;
  margin-top: 8px;
}
.stat span {
  font-size: 14px;
  color: var(--muted);
}
.two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.two-cols > .card {
  margin-bottom: 0;
}
.facts {
  margin: 14px 0 0;
  display: grid;
  gap: 0;
}
.facts > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f5;
}
.facts > div:last-child {
  border: 0;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  background: #edf2f6;
  color: #566e80;
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 13px;
}
.badge.good {
  background: #e5f5ec;
  color: #246943;
}
.badge.warn {
  background: #fff0dd;
  color: #916014;
}
.badge.bad {
  background: #fbe7e6;
  color: #a43b35;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.toolbar label {
  flex: 1 1 220px;
}
.toolbar button {
  flex: 0 0 auto;
}
.list {
  display: grid;
  gap: 12px;
}
.record {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px;
  background: #fff;
  min-width: 0;
  overflow-wrap: anywhere;
}
.record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.record-head h3 {
  margin: 0;
}
.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
.record .note {
  white-space: pre-wrap;
  margin-top: 12px;
  padding: 10px 12px;
  background: #f4f7fa;
  border-radius: 9px;
}
.record .actions {
  margin-top: 14px;
}
.empty {
  text-align: center;
  background: white;
  border: 1px dashed #c8d8e2;
  border-radius: 14px;
  padding: 44px 20px;
  color: var(--muted);
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.pager .actions {
  margin: 0;
}
.login-card {
  max-width: 460px;
  margin: 5vh auto 40px;
  background: #fff;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.login-card form {
  margin: 24px 0 16px;
}
.help {
  border-left: 3px solid #8bbdcc;
  padding: 10px 14px;
  background: #eff7f9;
  margin-top: 16px;
  font-size: 14px;
}
.loading {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
footer {
  padding: 28px 24px 32px;
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  width: min(92vw, 480px);
  max-height: 85dvh;
  padding: 26px;
  overflow: auto;
}
dialog::backdrop {
  background: #16324873;
}
dialog .actions {
  justify-content: flex-end;
}
.loading button {
  display: block;
  margin: 15px auto;
}
.token-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: -10px;
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .navigation {
    position: static;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 5px;
    scrollbar-width: thin;
  }
  .navigation button {
    flex: none;
    text-align: center;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-cols {
    grid-template-columns: 1fr;
  }
  .two-cols > .card {
    margin-bottom: 0;
  }
}
@media (max-width: 480px) {
  .topbar {
    padding: 17px 16px;
  }
  .brand strong {
    font-size: 16px;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
  .topbar > button {
    padding: 8px 10px;
    font-size: 13px;
  }
  main {
    padding: 0 14px;
  }
  .notice {
    font-size: 14px;
    padding: 11px 13px;
    margin-bottom: 14px;
  }
  .navigation {
    margin: 0 -2px;
  }
  .navigation button {
    padding: 9px 12px;
    font-size: 14px;
  }
  .section-heading {
    margin-bottom: 17px;
    gap: 8px;
  }
  h1 {
    font-size: 23px;
  }
  .card {
    padding: 18px;
    border-radius: 14px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat strong {
    font-size: 25px;
  }
  .facts > div {
    grid-template-columns: 90px minmax(0, 1fr);
  }
  .record {
    padding: 16px;
  }
  .record-head {
    flex-wrap: wrap;
  }
  .actions button {
    flex: 1 1 auto;
  }
  .toolbar label {
    flex-basis: 100%;
  }
  .toolbar button {
    flex: 1;
  }
  .login-card {
    margin: 20px auto;
    padding: 24px;
  }
  .pager {
    font-size: 13px;
  }
  .pager .actions {
    width: 100%;
  }
  .pager .actions button {
    flex: 1;
  }
  footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}
