@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/inter-700.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-500.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #080C14;
  --bg-2: #0D1320;
  --bg-elev: #0D1320;
  --panel: #121A28;
  --card: #121A28;
  --panel-2: #0F1726;
  --line: rgba(148, 179, 214, 0.14);
  --line-strong: rgba(148, 179, 214, 0.28);
  --text: #F8FAFC;
  --text-2: #CBD5E1;
  --muted: #8B9BB0;
  --accent: #3B82F6;
  --accent-2: #2563EB;
  --accent-text: #F8FAFC;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --gold: #D4AF6A;
  --paper: #F6F8FB;
  --good: #3BA57A;
  --bad: #C45C5C;
  --warn: #C9A15B;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
  --radius: 12px;
  --glass-blur: 16px;
  --grid-dot: rgba(148, 179, 214, 0.045);
  --grid-line: rgba(148, 179, 214, 0.035);
  --grain-opacity: 0.045;
  --font: Inter, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Noto Sans Mono", monospace;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F8FB;
  --bg-2: #EEF2F6;
  --bg-elev: #FBFCFD;
  --panel: #FFFFFF;
  --card: #FFFFFF;
  --panel-2: #F3F6FA;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --text: #0F172A;
  --text-2: #334155;
  --muted: #64748B;
  --accent: #3B82F6;
  --accent-2: #2563EB;
  --accent-text: #FFFFFF;
  --accent-soft: rgba(59, 130, 246, 0.10);
  --gold: #D4AF6A;
  --paper: #F6F8FB;
  --good: #2A8A64;
  --bad: #C0392B;
  --warn: #A57A22;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  --grid-dot: rgba(15, 23, 42, 0.035);
  --grid-line: rgba(15, 23, 42, 0.03);
  --grain-opacity: 0.035;
}
* { box-sizing: border-box; }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(1200px 640px at 50% -12%, rgba(59, 130, 246, 0.045), transparent 58%),
    radial-gradient(900px 560px at 100% 120%, rgba(0, 0, 0, 0.45), transparent 52%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: "tnum" 1;
}
html[data-theme="light"] body {
  background:
    radial-gradient(1100px 600px at 50% -14%, rgba(59, 130, 246, 0.035), transparent 60%),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(var(--grid-dot) 1px, transparent 1.2px),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 16px 16px, 48px 48px, 48px 48px;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
html[data-theme="light"] body::after { mix-blend-mode: multiply; }
.wrap, .login-card, .theme-toggle { position: relative; z-index: 2; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.admin-page { width: min(1240px, calc(100% - 24px)); }
.scroll { overflow: auto; }
.fresh { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--good); border-radius: 10px; background: color-mix(in srgb, var(--good) 12%, transparent); }
.key { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ops { display: flex; gap: 4px; flex-wrap: wrap; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 12px; align-items: center; color: inherit; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
}
.brand-mark img, .brand img.logo-dark, .brand img.logo-light {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 0;
}
.logo-light { display: none !important; }
html[data-theme="light"] .logo-dark { display: none !important; }
html[data-theme="light"] .logo-light { display: block !important; }
.brand b { display: block; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.brand span, .muted { color: var(--muted); font-size: 13px; }
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn, .ghost {
  border-radius: 8px; padding: 8px 14px; border: 1px solid transparent; background: var(--accent); color: var(--accent-text);
  font-weight: 550;
}
.btn:hover { background: var(--accent-2); }
.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.ghost:hover { background: var(--accent-soft); }
.theme-toggle {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 8;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px 8px;
  font-weight: 500;
}
.theme-toggle:hover { color: var(--text); background: transparent; }
.nav .theme-toggle, .top .theme-toggle { position: static; padding: 6px 8px; }
.hero { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 28px; padding: 48px 0 24px; align-items: center; }
.hero h1 { font-size: 40px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.03em; font-weight: 650; }
.hero p { color: var(--muted); font-size: 16px; line-height: 1.7; }
.mark { width: min(240px, 70vw); border-radius: 28px; justify-self: end; box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; padding-bottom: 40px; }
.card {
  background: color-mix(in srgb, var(--card) 78%, transparent);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.06);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.06);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}
html[data-theme="light"] .card { background: color-mix(in srgb, #ffffff 86%, transparent); }
h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13px; }
.meta b { display: block; font-size: 14px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 12px; }
input, textarea, select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hash { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.login-card { width: min(440px, calc(100% - 32px)); margin: 14vh auto; padding: 28px 28px 24px; }
.login-card h2 { margin-top: 18px; font-size: 22px; letter-spacing: -0.02em; }
.login-card .brand { margin: 0; }
.login-card .brand-mark, .login-card .brand-mark img {
  width: 72px;
  height: 72px;
}
.secret { display: flex; gap: 8px; align-items: center; }
.secret input { flex: 1; }
.secret button { white-space: nowrap; }
.error { color: var(--bad); min-height: 1.2em; }
.tabs { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.tabs button.on { background: var(--accent); color: var(--accent-text); border-color: transparent; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.hidden { display: none; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.toolbar input, .toolbar select { width: auto; }
@media (max-width: 800px) {
  .hero, .grid { grid-template-columns: 1fr; }
  .mark { justify-self: start; }
  .login-card { margin: 10vh auto; }
}
