:root {
  color-scheme: light;
  --page: #6873cf;
  --surface: #ffffff;
  --surface-subtle: #f5f7f9;
  --surface-muted: #eef2f5;
  --ink: #152d3f;
  --ink-soft: #526778;
  --ink-faint: #82919d;
  --line: #dce4e9;
  --header: #293d4c;
  --green: #1faf68;
  --green-hover: #15985a;
  --violet: #8054b4;
  --violet-hover: #6f449f;
  --blue: #258bc8;
  --blue-soft: #e8f5fc;
  --warning-soft: #fff8e8;
  --warning-line: #e7c879;
  --shadow: 0 20px 55px rgb(28 40 75 / 22%);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

button,
select {
  font: inherit;
}

button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(37 139 200 / 32%);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: flex;
  flex-direction: column;
  width: min(1400px, calc(100% - 48px));
  min-height: calc(100vh - 48px);
  margin: 24px auto;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  padding: 42px 48px 40px;
  background: var(--header);
  color: #ffffff;
  text-align: center;
}

.back-link {
  position: absolute;
  top: 18px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #d9e4ea;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.back-link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hero__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.35;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 9px;
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: 4px;
  background: rgb(255 255 255 / 10%);
  color: #dfe9ef;
  font-size: 13px;
  font-weight: 700;
}

.hero p {
  max-width: 760px;
  margin: 10px auto 0;
  color: #b8c8d2;
  font-size: 15px;
}

.controls {
  padding: 30px 30px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field > span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.field select {
  width: 100%;
  min-height: 44px;
  padding: 8px 38px 8px 12px;
  border: 1px solid #cfd9df;
  border-radius: 6px;
  background-color: #ffffff;
  color: #172c3c;
  cursor: pointer;
}

.field select:hover:not(:disabled) {
  border-color: #95a7b3;
}

.field select:disabled {
  background: #edf1f3;
  color: #536774;
  cursor: not-allowed;
  opacity: 1;
}

.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button:hover:not(:disabled) {
  box-shadow: 0 5px 12px rgb(26 42 55 / 16%);
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  box-shadow: none;
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button--primary {
  background: var(--green);
}

.button--primary:hover:not(:disabled) {
  background: var(--green-hover);
}

.button--secondary {
  min-width: 154px;
  background: var(--violet);
}

.button--secondary:hover:not(:disabled) {
  background: var(--violet-hover);
}

.button--compact {
  min-height: 38px;
  padding: 7px 12px;
  background: var(--blue);
  font-size: 14px;
}

.safety-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--warning-line);
  background: var(--warning-soft);
  color: #665528;
  font-size: 13px;
}

.safety-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  fill: none;
  stroke: #9b7826;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.safety-note p {
  margin: 0;
}

.section {
  padding: 28px 30px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading--bordered {
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue);
}

.section-heading h2 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.4;
}

.section-heading h2 svg,
.detail-group h3 svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.count-badge {
  min-width: 24px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

thead {
  background: var(--surface-muted);
}

th {
  color: #243b4c;
  font-size: 14px;
}

th:nth-child(1),
td:nth-child(1) {
  width: 7%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 27%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 10%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 28%;
}

th:nth-child(5),
td:nth-child(5) {
  width: 14%;
}

th:nth-child(6),
td:nth-child(6) {
  width: 14%;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:not(.empty-row) {
  transition: background-color 140ms ease;
}

tbody tr:not(.empty-row):hover {
  background: #f8fbfc;
}

tbody tr.is-selected {
  background: var(--blue-soft);
}

tbody tr.is-selected:hover {
  background: var(--blue-soft);
}

.person-name {
  color: #101d26;
  font-weight: 700;
}

.row-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 11px;
  border: 0;
  border-radius: 5px;
  background: var(--blue);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.row-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.row-action:hover {
  background: #1777b2;
}

.empty-row td {
  height: 118px;
  color: var(--ink-faint);
  text-align: center;
}

.empty-row svg {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  vertical-align: -5px;
}

.details {
  flex: 1 0 auto;
  padding-top: 0;
}

.detail-empty {
  display: grid;
  min-height: 150px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--ink-faint);
  text-align: center;
}

.detail-empty svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #9ba8b1;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-empty p {
  margin: 0;
}

.detail-content {
  padding-top: 18px;
}

.detail-group + .detail-group {
  margin-top: 20px;
}

.detail-group h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: #1e394b;
  font-size: 17px;
}

.detail-group h3 svg {
  width: 19px;
  height: 19px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin: 0;
}

.detail-grid > div {
  min-width: 0;
  padding: 12px 0 10px;
  border-bottom: 1px solid #edf1f3;
}

.detail-grid__wide {
  grid-column: 1 / -1;
}

.detail-grid dt {
  margin: 0 0 2px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 700;
}

.detail-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #152d3f;
  font-size: 16px;
  font-weight: 600;
}

.status-chip {
  display: inline-flex;
  padding: 2px 8px;
  border: 1px solid #b9dfc9;
  border-radius: 4px;
  background: #edf9f2;
  color: #217148;
  font-size: 12px;
  font-weight: 700;
}

.about {
  margin: 8px 30px 30px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.about h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.about p {
  max-width: 980px;
  margin: 6px 0;
  color: var(--ink-soft);
  font-size: 14px;
}

footer {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  padding: 22px 30px;
  background: var(--header);
  color: #c5d3dc;
  font-size: 13px;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 15px;
  border-radius: 6px;
  background: #1e2f3a;
  box-shadow: 0 10px 28px rgb(0 0 0 / 24%);
  color: #ffffff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: #8b2c35;
}

noscript {
  display: block;
  padding: 16px;
  background: #fff2c7;
  color: #5d4900;
  text-align: center;
}

@media (max-width: 1023px) {
  .app-shell {
    width: min(100% - 28px, 1000px);
    margin: 14px auto;
  }

  .hero {
    padding-inline: 28px;
  }

  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html {
    scroll-behavior: auto;
  }

  body {
    background: var(--surface);
    font-size: 15px;
  }

  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hero {
    padding: 50px 20px 28px;
    text-align: left;
  }

  .back-link {
    top: 16px;
    left: 18px;
  }

  .hero__title-row {
    justify-content: flex-start;
    gap: 8px;
  }

  .hero__icon {
    width: 28px;
    height: 28px;
  }

  .hero h1 {
    max-width: calc(100% - 38px);
    font-size: 23px;
  }

  .hero__tag {
    margin-left: 36px;
  }

  .hero p {
    margin-top: 9px;
    font-size: 13px;
  }

  .controls,
  .section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .controls {
    padding-top: 22px;
  }

  .control-grid,
  .action-row,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .control-grid {
    gap: 13px;
  }

  .action-row {
    gap: 10px;
    margin-top: 18px;
  }

  .button--secondary {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: 19px;
  }

  .section-heading--bordered {
    align-items: center;
  }

  .button--compact span {
    display: none;
  }

  .button--compact {
    width: 40px;
    min-height: 40px;
    padding: 8px;
  }

  .detail-grid__wide {
    grid-column: auto;
  }

  .detail-grid {
    gap: 0;
  }

  .about {
    margin: 0 18px 24px;
    padding-right: 0;
    padding-left: 0;
  }

  footer {
    padding: 20px 18px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
