:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #172540;
  background: #f4f6fa;
  font-size: 14px;
  font-synthesis: none;
  --muted: #576781;
  --border: #dce3ee;
  --blue: #2649b2;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
.topbar { background: #13213d; color: #fff; }
.top-inner, main { width: min(calc(100% - 64px), 1220px); margin-inline: auto; }
.top-inner { min-height: 64px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.logo {
  display: grid; place-items: center; width: 31px; height: 31px;
  border-radius: 8px; background: #4266d4; font-size: 22px; line-height: 1;
}
.top-label { border-left: 1px solid #475675; padding-left: 18px; color: #bac8e0; font-size: 13px; }
main { padding-block: 42px 56px; }
.intro, .panel-header, .panel-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.intro { align-items: end; margin-bottom: 24px; }
h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.25; }
h2 { margin: 0; font-size: 17px; }
p { margin: 0; color: var(--muted); }
.refresh, .panel-footer nav { display: flex; align-items: center; gap: 12px; }
.refresh, .panel-footer { color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
.stat, .panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.stat { padding: 17px 19px; }
.stat dt { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.stat dd { margin: 8px 0 0; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #8192ac; }
.dot.active { background: #5578ea; }
.dot.ready { background: #16805e; }
.dot.failed { background: #d14c55; }
.panel-header, .panel-footer { padding: 17px 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
input, select, .button {
  min-height: 37px; border: 1px solid var(--border); border-radius: 7px;
  background: #fff; color: #253654; font: inherit; padding: 7px 11px;
}
input { width: 170px; }
.button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; white-space: nowrap; }
.button:hover { background: #edf1f8; }
.button.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button.primary:hover { background: #1b388e; }
:focus-visible { outline: 2px solid #3159d4; outline-offset: 3px; }
.topbar :focus-visible { outline-color: #bacaff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 13px 20px; border-top: 1px solid var(--border); }
th { color: var(--muted); background: #f7f9fc; font-size: 13px; white-space: nowrap; }
td { vertical-align: top; }
tbody tr:hover { background: #fbfcff; }
code, .date { white-space: nowrap; }
.date { font-variant-numeric: tabular-nums; }
.pill {
  display: inline-block; padding: 4px 8px; border-radius: 5px; white-space: nowrap;
  font-size: 12px; background: #ecf0f5; color: #4c5a71;
}
.pill.processing, .pill.resolving, .pill.queued { background: #e9efff; color: #2649a8; }
.pill.ready { background: #e2f5ec; color: #116448; }
.pill.failed { background: #fcebed; color: #a52c3a; }
.progress { display: flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; font-size: 12px; }
progress { width: 88px; height: 7px; accent-color: var(--blue); }
.stage, .task-error { margin-top: 5px; font-size: 12px; color: var(--muted); }
.task-error { color: #a52c3a; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 66px 12px; }
.empty strong, .empty span { display: block; }
.empty span { margin-top: 7px; color: var(--muted); }
.panel-footer { border-top: 1px solid var(--border); }
@media (max-width: 720px) {
  .top-inner, main { width: calc(100% - 32px); }
  main { padding-block: 26px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat, .panel-header, .panel-footer { padding: 12px; }
  th, td { padding-inline: 12px; }
}

.logout-form { margin: 0 0 0 auto; }
.logout-form .button {
  min-height: 32px; border-color: #526281; background: transparent;
  color: #e4ebfb; font-size: 13px;
}
.logout-form .button:hover { background: #243657; }
.login-page { min-height: 100dvh; display: flex; flex-direction: column; }
.login-main { flex: 1; display: grid; align-items: center; justify-items: center; }
.login-card { width: min(100%, 400px); padding: clamp(24px, 5vw, 36px); }
.login-card h1 { font-size: 25px; margin-bottom: 24px; }
.login-form { display: grid; gap: 8px; }
.login-form label { font-weight: 600; }
.login-form input { width: 100%; min-height: 42px; margin-bottom: 9px; }
.login-form button { min-height: 42px; margin-top: 4px; }
.login-error { background: #fcebed; color: #a52c3a; padding: 10px 12px; border-radius: 7px; margin-bottom: 8px; }

.view-nav { display: flex; gap: 20px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.view-nav a { padding: 0 1px 10px; color: var(--muted); border-bottom: 2px solid transparent; }
.view-nav a[aria-current="page"] { border-color: var(--blue); color: var(--blue); font-weight: 600; }
