:root {
  color-scheme: light;
  font-family: Inter, "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  color: #202a34;
  background: #f5f7f8;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { min-height: 36px; padding: 0 12px; border: 1px solid #c6d0d8; border-radius: 4px; background: #fff; color: inherit; cursor: pointer; }
button:hover { background: #edf2f5; }
button:focus-visible, input:focus-visible { outline: 2px solid #16836f; outline-offset: 2px; }
input { min-width: 0; min-height: 36px; padding: 6px 9px; border: 1px solid #c6d0d8; border-radius: 4px; background: #fff; }
.topbar { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid #d5dde3; background: #fff; }
.health { color: #53616d; font-size: 13px; }
.identity { display: flex; align-items: center; gap: 10px; }
.identity #employee { font-size: 13px; font-weight: 600; }
.app-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 52px); }
nav { padding: 18px 12px; border-right: 1px solid #d5dde3; background: #eef2f4; }
.nav-item { width: 100%; margin-bottom: 4px; text-align: left; border-color: transparent; background: transparent; }
.nav-item.active { border-color: #c5d5d2; background: #dceae7; color: #155d52; }
main { min-width: 0; padding: 20px 24px 36px; }
h1 { margin: 0 0 18px; font-size: 21px; font-weight: 650; }
h2 { margin: 0; font-size: 15px; font-weight: 650; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid #d5dde3; }
.toolbar label { font-size: 13px; font-weight: 600; }
.toolbar input { width: min(380px, 60vw); }
.primary { border-color: #126b5d; background: #126b5d; color: #fff; }
.primary:hover { background: #0e5a4f; }
.view { display: none; }
.view.active { display: block; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel { min-width: 0; border-top: 2px solid #7e9b96; background: #fff; }
.panel + .panel { margin-top: 18px; }
.panel-heading { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; border-bottom: 1px solid #e0e6ea; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { padding: 9px 12px; border-bottom: 1px solid #e6ebee; white-space: nowrap; }
th { color: #596773; background: #f8fafb; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 820px; }
.form-grid label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.form-grid button { justify-self: start; align-self: end; }
#exception-form { padding: 14px 12px; }
#exception-result { display: block; padding: 0 12px 14px; color: #53616d; font-size: 13px; }
.empty-state { padding: 16px 12px; color: #677580; font-size: 13px; }
#notice { margin-top: 18px; color: #53616d; font-size: 13px; }
.error-state { margin: 0; padding: 16px 12px; color: #a3342d; background: #fff7f6; font-size: 13px; }
details { white-space: normal; min-width: 180px; color: #53616d; font-size: 12px; }
details summary { cursor: pointer; color: #155d52; }
details pre { max-width: min(760px, 70vw); overflow: auto; padding: 10px; background: #f5f7f8; color: #28343d; white-space: pre-wrap; overflow-wrap: anywhere; }
details small { display: block; overflow-wrap: anywhere; }
.detail-row td { padding-top: 2px; background: #fbfcfc; }
table td { vertical-align: top; }
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 52px; gap: 8px; padding: 8px 12px; }
  .identity { flex-wrap: wrap; justify-content: flex-end; }
  .app-shell { grid-template-columns: 1fr; }
  nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid #d5dde3; }
  .nav-item { width: auto; flex: 0 0 auto; margin: 0; }
  main { padding: 16px 12px 28px; }
  .split { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar > strong { flex: 0 0 auto; }
  .health { display: none; }
  details pre { max-width: 82vw; }
}
