:root {
  color-scheme: dark;
  --bg: #08090a;
  --panel: #0f1011;
  --raise: #151618;
  --hover: rgba(255, 255, 255, 0.035);
  --active: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f7f8f8;
  --text-2: #d0d6e0;
  --muted: #8a8f98;
  --faint: #62666d;
  --accent: #5e6ad2;
  --accent-hi: #7170ff;
  --accent-soft: rgba(94, 106, 210, 0.16);
  --ring: rgba(113, 112, 255, 0.45);
  --ok: #4cb782;
  --bad: #eb5757;
  --wait: #f2c94c;
  --idle: #8a8f98;
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(113, 112, 255, 0.18), transparent 70%);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #fbfbfc;
    --panel: #fff;
    --raise: #f4f5f8;
    --hover: rgba(0, 0, 0, 0.03);
    --active: rgba(0, 0, 0, 0.05);
    --line: rgba(0, 0, 0, 0.08);
    --line-2: rgba(0, 0, 0, 0.14);
    --text: #0f1011;
    --text-2: #3c4049;
    --muted: #6b6f76;
    --faint: #9a9ca1;
    --accent-soft: rgba(94, 106, 210, 0.1);
    --ring: rgba(94, 106, 210, 0.35);
    --ok: #2f9e6a;
    --bad: #d64545;
    --wait: #c99400;
    --glow: radial-gradient(60% 50% at 50% 0%, rgba(94, 106, 210, 0.12), transparent 70%);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfbfc;
  --panel: #fff;
  --raise: #f4f5f8;
  --hover: rgba(0, 0, 0, 0.03);
  --active: rgba(0, 0, 0, 0.05);
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.14);
  --text: #0f1011;
  --text-2: #3c4049;
  --muted: #6b6f76;
  --faint: #9a9ca1;
  --accent-soft: rgba(94, 106, 210, 0.1);
  --ring: rgba(94, 106, 210, 0.35);
  --ok: #2f9e6a;
  --bad: #d64545;
  --wait: #c99400;
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(94, 106, 210, 0.12), transparent 70%);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.006em;
}
a {
  color: inherit;
  text-decoration: none;
}
code,
pre,
.mono,
kbd {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection {
  background: var(--accent-soft);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  display: flex;
  white-space: nowrap;
  flex: none;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #dc143c 0 50%, #2741a8 50%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.nav-links {
  display: flex;
  gap: 2px;
}
.nav-links a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--hover);
}
.nav-links a[aria-current="page"] {
  color: var(--text);
}
.grow {
  flex: 1;
}
@media (max-width: 560px) {
  .nav-hide {
    display: none !important;
  }
  .nav-in {
    gap: 8px;
  }
  .nav-links a {
    padding: 6px 8px;
  }
}
@media (hover: none) {
  kbd,
  .kbd-hint {
    display: none !important;
  }
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--raise);
  color: var(--text);
  font:
    500 13px/1 Inter,
    system-ui,
    sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.btn:hover {
  background: var(--active);
  border-color: var(--faint);
}
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn.primary:hover {
  background: var(--accent-hi);
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn.ghost:hover {
  color: var(--text);
  background: var(--hover);
}
.btn.lg {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 8px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: var(--raise);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}
.btn.primary kbd {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.tag.env::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wait);
}
.tag.env.production::before {
  background: var(--bad);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.panel-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
}
.panel-b {
  padding: 16px;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.small {
  font-size: 12px;
}

.st {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
.st i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  border: 2px dashed var(--wait);
}
.st.SUCCESS i {
  border: 0;
  background: var(--ok);
  box-shadow:
    inset 0 0 0 3px var(--panel),
    0 0 0 1px var(--ok);
}
.st.FAILED i,
.st.CANCELED i,
.st.EXPIRED i {
  border: 0;
  background: var(--bad);
  box-shadow:
    inset 0 0 0 3px var(--panel),
    0 0 0 1px var(--bad);
}
.st.NOT_FOUND i {
  border: 2px solid var(--idle);
}
.st.REFUNDED i,
.st.PARTIALLY_REFUNDED i {
  border: 2px solid var(--muted);
  background: linear-gradient(90deg, var(--muted) 50%, transparent 50%);
}

.mono-badge {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.mono-badge.sm {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 10px;
}
.mono-badge.off {
  background: var(--raise);
  color: var(--faint);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 110px 120px 90px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.row:last-child {
  border-bottom: 0;
}
a.row:hover {
  background: var(--hover);
}
.row.head {
  min-height: 34px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
}
.row .num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.who span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 16px;
    row-gap: 4px;
  }
  .row .hide-sm,
  .row.head {
    display: none;
  }
}
.empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty b {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
}
footer {
  border-top: 1px solid var(--line);
  margin-top: 80px;
  padding: 24px 0 40px;
  color: var(--faint);
  font-size: 12px;
}
footer .wrap {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
footer a:hover {
  color: var(--text);
}

.theme-toggle {
  width: 32px;
  padding: 0;
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
}
.theme-toggle [data-icon] {
  display: none;
}
:root:not([data-theme]) .theme-toggle [data-icon="system"],
:root[data-theme="light"] .theme-toggle [data-icon="light"],
:root[data-theme="dark"] .theme-toggle [data-icon="dark"] {
  display: block;
}
