:root {
  --bg: #f3f5fa;
  --panel: #ffffff;
  --border: #e6e9f1;
  --text: #1f2430;
  --muted: #6b7280;
  --faint: #8a93a3;
  --accent: #3b6ef6;
  --accent-dark: #2f5ce0;
  --accent-soft: #eef2ff;
  --danger: #d14343;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1100px 480px at 50% -10%, #e8eefc 0%, var(--bg) 55%),
    radial-gradient(900px 520px at 100% 100%, #f1ecff 0%, rgba(241, 236, 255, 0) 60%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #c7d7ff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #c9d2e3;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #aab6cf;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.topNav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px -22px rgba(16, 24, 40, .55);
  transition: box-shadow .2s ease, background .2s ease;
}

.topNav.scrolled {
  box-shadow: 0 10px 30px -16px rgba(16, 24, 40, .35);
}

.topNavInner {
  margin: 0 auto;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topNavLink {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 14px;
  color: #4b5563;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.topNavLink:hover {
  background: #f1f4fb;
  color: var(--text);
}

.topNavLink.active {
  background: var(--accent-soft);
  color: #2b4bbf;
  font-weight: 600;
}

header {
  margin: 0 auto;
  padding: 36px 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brandMark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, #3b6ef6, #7a5cf0);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .5px;
  box-shadow: 0 8px 18px -8px rgba(59, 110, 246, .8);
}

h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: .2px;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 {
    background: linear-gradient(120deg, #2b3a55, #3b6ef6 55%, #7a5cf0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.subtitle {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--faint);
}

main {
  margin: 0 auto;
  padding: 22px 20px 48px;
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 1px 2px rgba(16, 24, 40, .05),
    0 18px 44px -26px rgba(16, 24, 40, .32);
  animation: panelIn .5s cubic-bezier(.2, .8, .3, 1) both;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 110, 246, .22), transparent);
  pointer-events: none;
}

.panel:nth-of-type(2) {
  animation-delay: .07s;
}

.panel:nth-of-type(3) {
  animation-delay: .14s;
}

.panel:nth-of-type(4) {
  animation-delay: .21s;
}

.panelTitle {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: #38404e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panelTitle::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #3b6ef6, #7a5cf0);
}

#status.error {
  color: var(--danger);
}

input,
select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d5dae4;
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder {
  color: #a6adba;
}

input:hover,
select:hover {
  border-color: #b9c4dd;
}

input:focus,
select:focus {
  outline: none;
  border-color: #7aa2ff;
  box-shadow: 0 0 0 3px rgba(59, 110, 246, .14);
}

button {
  height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #5487ff, #3b6ef6);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 18px -10px rgba(59, 110, 246, .9);
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}

button:hover:not(:disabled) {
  background: linear-gradient(180deg, #3f70f0, var(--accent-dark));
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 24px -10px rgba(59, 110, 246, .95);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: .55;
  cursor: default;
  box-shadow: none;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid #7aa2ff;
  outline-offset: 2px;
}

dt {
  color: #7a8290;
}

dd {
  margin: 0;
  word-break: break-word;
}

.diffBadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  transition: transform .12s ease, box-shadow .12s ease;
}

.diffBadge img {
  width: 15px;
  height: 15px;
  display: block;
}

.diffBadge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35);
}

.tableWrap {
  overflow-x: auto;
  border: 1px solid #eceef4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eceef4;
  white-space: nowrap;
}

th {
  background: #f7f9fc;
  font-weight: 600;
  color: #5b6472;
  font-size: 12.5px;
  letter-spacing: .3px;
}

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

tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

tbody tr:hover td {
  background: #f4f7ff;
}

.num {
  font-variant-numeric: tabular-nums;
}

#pager {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  justify-items: start;
}

#pager button {
  border-radius: 999px;
  font-weight: 600;
}

#pageNumbers {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

#pageNumbers button {
  height: 34px;
  min-width: 38px;
  padding: 0 12px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #fff;
  color: #3455d0;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
}

#pageNumbers button:hover:not(:disabled):not(.currentPage) {
  background: var(--accent-soft);
  transform: none;
}

#pageNumbers button.currentPage {
  background: linear-gradient(135deg, #4a7bf8, #3b6ef6);
  border-color: transparent;
  color: #fff;
  cursor: default;
}

#pageNumbers button:disabled {
  opacity: .5;
  cursor: default;
}

.pageDots {
  color: var(--faint);
  font-size: 13px;
}

.jumpRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jumpLabel,
.jumpUnit {
  font-size: 13px;
  color: var(--muted);
}

.jumpRow input {
  width: 90px;
  height: 34px;
}

#jumpBtn {
  height: 34px;
  padding: 0 16px;
  font-size: 13px;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .45;
  }
}

tr.rowIn {
  animation: fadeSlide .35s cubic-bezier(.2, .8, .3, 1) both;
}

.loading {
  animation: pulse 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
