/* 静页 · static HTML distribution — one stylesheet, no external assets */
:root {
  --bg: #070b11;
  --bg-soft: #0a0f17;
  --panel: #0d141e;
  --panel-2: #111a26;
  --line: #1c2938;
  --line-soft: #16212e;
  --text: #e9f0f8;
  --muted: #92a5b9;
  --dim: #65788c;
  --accent: #5eead4;
  --accent-2: #7dd3fc;
  --accent-ink: #05221e;
  --accent-dim: rgba(94, 234, 212, 0.1);
  --danger: #f87171;
  --danger-dim: rgba(248, 113, 113, 0.1);
  --radius: 16px;
  --maxw: 1140px;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(45, 212, 191, 0.1), transparent 62%),
    radial-gradient(720px 460px at 92% -6%, rgba(125, 211, 252, 0.07), transparent 60%),
    radial-gradient(800px 700px at 50% 110%, rgba(94, 234, 212, 0.035), transparent 70%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 35%, transparent 100%);
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
code, kbd, pre { font-family: var(--mono); }
[hidden] { display: none !important; }
::selection { background: rgba(94, 234, 212, 0.3); color: #fff; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(28, 41, 56, 0.75);
  background: rgba(7, 11, 17, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
}
.topbar-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--accent);
  background: linear-gradient(150deg, rgba(94, 234, 212, 0.16), rgba(125, 211, 252, 0.05));
  border: 1px solid rgba(94, 234, 212, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-mark.large { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 20px; }
.brand-mark.large svg { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 15px; font-weight: 700; letter-spacing: 0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.24em; color: var(--dim); margin-top: 3px; }
.topnav { display: flex; align-items: center; gap: 9px; flex: none; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.12);
  flex: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, transform 0.16s, color 0.16s, box-shadow 0.16s;
}
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.primary {
  background: linear-gradient(180deg, #72f0dd, var(--accent));
  color: var(--accent-ink);
  border-color: rgba(94, 234, 212, 0.7);
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.16);
}
.btn.primary:hover { background: #8bf5e6; transform: translateY(-1px); }
.btn.ghost { border-color: var(--line); background: rgba(255, 255, 255, 0.025); color: var(--text); }
.btn.ghost:hover { border-color: #2c435a; background: rgba(255, 255, 255, 0.045); }
.btn.danger { border-color: rgba(248, 113, 113, 0.35); background: var(--danger-dim); color: #fecaca; }
.btn.danger:hover { border-color: rgba(248, 113, 113, 0.6); background: rgba(248, 113, 113, 0.17); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible, .icon-btn:focus-visible, .dropzone:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--accent); border-color: rgba(94, 234, 212, 0.4); background: var(--accent-dim); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
  padding-top: 74px;
  padding-bottom: 46px;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
.hero h1 {
  font-size: clamp(36px, 5.2vw, 58px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.hero-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 24px 0 0;
  color: var(--dim);
  font-size: 12.5px;
}
.hero-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, #0f1823, #0a1018 62%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.018);
}
.panel-bar span { width: 8px; height: 8px; border-radius: 50%; background: #223041; }
.panel-bar span:first-child { background: rgba(248, 113, 113, 0.65); }
.panel-bar span:nth-child(2) { background: rgba(251, 191, 36, 0.6); }
.panel-bar span:nth-child(3) { background: rgba(94, 234, 212, 0.6); }
.panel-bar em { margin-left: auto; font-family: var(--mono); font-style: normal; font-size: 10.5px; color: var(--dim); }
.code {
  margin: 0;
  padding: 20px 20px 18px;
  font-size: 13px;
  line-height: 1.95;
  color: #cfe0f0;
  overflow-x: auto;
}
.code .c-dim { color: #576a7e; }
.code .c-key { color: var(--accent-2); }
.code .c-str { color: #f9d38c; }
.code .c-ok { color: var(--accent); }
.panel-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* ---------- stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 10px;
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 26, 38, 0.7), rgba(13, 20, 30, 0.55));
  overflow: hidden;
}
.stat { padding: 20px 24px; border-left: 1px solid var(--line-soft); }
.stat:first-child { border-left: 0; }
.stat-label { display: block; margin-bottom: 6px; color: var(--dim); font-size: 12px; letter-spacing: 0.06em; }
.stat strong { font-size: 29px; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-unit { margin-left: 6px; color: var(--muted); font-size: 12.5px; }

/* ---------- catalog ---------- */
.catalog { padding-top: 64px; padding-bottom: 84px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.section-head h2 { font-size: 27px; font-weight: 750; }
.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 23px;
  padding: 0 8px;
  margin-left: 7px;
  border: 1px solid rgba(94, 234, 212, 0.26);
  border-radius: 7px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  vertical-align: 3px;
}
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(340px, 100%);
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(9, 14, 21, 0.7);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.search:focus-within { border-color: rgba(94, 234, 212, 0.5); box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.08); }
.search svg { width: 17px; height: 17px; margin-left: 13px; color: var(--dim); flex: none; }
.search input { width: 100%; height: 100%; padding: 0 10px; border: 0; background: transparent; font-size: 13.5px; outline: none; }
.search input::placeholder { color: var(--dim); }
.search kbd {
  margin-right: 10px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--dim);
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.03);
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(318px, 1fr)); gap: 18px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px 20px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(16, 25, 36, 0.92), rgba(11, 17, 25, 0.92));
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.35), transparent);
  opacity: 0;
  transition: opacity 0.18s;
}
.card:hover { border-color: rgba(94, 234, 212, 0.35); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32); }
.card:hover::before { opacity: 1; }
.card-head { display: flex; align-items: flex-start; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  margin-top: 2px;
  border: 1px solid rgba(94, 234, 212, 0.24);
  border-radius: 6px;
  background: rgba(94, 234, 212, 0.07);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  flex: none;
}
.card h3 { min-width: 0; font-size: 18px; font-weight: 700; line-height: 1.35; }
.card h3 a { transition: color 0.16s; overflow-wrap: anywhere; }
.card h3 a:hover { color: var(--accent); }
.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  margin: 11px 0 13px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.card-meta code {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(94, 234, 212, 0.07);
  color: #9fe9dd;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.card-meta span { color: var(--dim); font-size: 11.5px; }
.card-meta span + span::before { content: "·"; margin-right: 7px; color: #38495c; }
.card-actions { display: flex; align-items: center; gap: 8px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.card-actions .btn { flex: 0 0 auto; }
.card-actions .icon-btn { margin-left: auto; }
.empty {
  padding: 66px 28px;
  border: 1.5px dashed #243346;
  border-radius: var(--radius);
  background: rgba(13, 20, 30, 0.4);
  text-align: center;
}
.empty.small { padding: 34px 20px; border: 0; background: none; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 18px; background: var(--accent-dim); color: var(--accent); }
.empty-icon svg { width: 38px; height: 38px; }
.empty h3 { font-size: 21px; margin-bottom: 8px; }
.empty p { max-width: 420px; margin: 0 auto 20px; color: var(--muted); font-size: 14px; }
.empty-search { margin: 20px 0 0; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 14px; }

/* ---------- footer ---------- */
.footer { margin-top: auto; border-top: 1px solid var(--line-soft); background: rgba(7, 11, 17, 0.55); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; color: var(--dim); font-size: 12px; }
.footer p { margin: 0; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-meta a { color: var(--muted); }
.footer-meta a:hover { color: var(--accent); }

/* ---------- admin ---------- */
.admin-main { padding-top: 42px; padding-bottom: 80px; }
.auth-view { display: flex; justify-content: center; padding: 50px 0 30px; }
.auth-card {
  width: 100%;
  max-width: 452px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(17, 26, 38, 0.95), rgba(10, 16, 24, 0.95));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.auth-card h1 { font-size: 28px; margin-bottom: 10px; }
.auth-card > .muted { font-size: 13.5px; line-height: 1.75; margin: 0 0 22px; }
.auth-card code, .hint code, .guide-list code { padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.05); color: #9fe9dd; font-size: 0.92em; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.hint { margin: 16px 0 0; color: var(--dim); font-size: 12px; line-height: 1.7; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.dash-head h1 { font-size: 32px; font-weight: 780; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(170deg, rgba(16, 25, 36, 0.9), rgba(11, 17, 25, 0.9));
}
.stat-card .stat-label { margin-bottom: 4px; }
.stat-card strong { display: block; font-size: 25px; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--dim); font-size: 11.5px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(15, 23, 34, 0.92), rgba(10, 16, 24, 0.92));
  min-width: 0;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 17px; font-weight: 700; }
.panel h2 { font-size: 17px; }
.dropzone {
  padding: 24px 18px;
  border: 1.5px dashed #27384b;
  border-radius: 13px;
  background: rgba(8, 13, 20, 0.55);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}
.dropzone:hover, .dropzone.drag { border-color: rgba(94, 234, 212, 0.55); background: rgba(94, 234, 212, 0.05); }
.dz-icon { width: 38px; height: 38px; margin: 0 auto 10px; color: var(--accent); opacity: 0.92; }
.dropzone p { margin: 0; font-size: 13.5px; }
.dropzone p + p { margin-top: 5px; }
.file-info {
  display: inline-flex;
  max-width: 100%;
  margin-top: 12px !important;
  padding: 5px 10px;
  border: 1px solid rgba(94, 234, 212, 0.25);
  border-radius: 8px;
  background: var(--accent-dim);
  color: #a9efe4 !important;
  font-family: var(--mono);
  font-size: 11.5px !important;
  overflow-wrap: anywhere;
}
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 17px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { color: var(--muted); font-size: 12px; }
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #080e16;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.field textarea { resize: vertical; min-height: 64px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #4d6074; }
.field input:focus, .field textarea:focus { border-color: rgba(94, 234, 212, 0.55); box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.08); }
.span2 { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.form-error {
  margin: 13px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 9px;
  background: var(--danger-dim);
  color: #fecaca;
  font-size: 12.5px;
}
.form-actions { display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; }
.progress { height: 6px; margin-top: 16px; border-radius: 999px; background: #16202d; overflow: hidden; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.18s; }
.guide-list { list-style: none; margin: 0; padding: 0; }
.guide-list li { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.guide-list li:last-child { border-bottom: 0; }
.guide-list strong { color: var(--text); font-weight: 650; }
.guide-list span { color: var(--muted); line-height: 1.65; }
.pages-panel { padding-top: 20px; }
.page-list { display: flex; flex-direction: column; }
.page-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 15px 2px; border-top: 1px solid var(--line-soft); align-items: center; }
.page-row:first-child { border-top: 0; }
.page-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; font-weight: 650; }
.page-title a:hover { color: var(--accent); }
.page-title code { padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.04); color: var(--dim); font-size: 10.5px; font-weight: 400; }
.page-desc { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.page-meta { margin-top: 3px; color: var(--dim); font-size: 11.5px; }
.page-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0e1621;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.dialog::backdrop { background: rgba(3, 6, 10, 0.7); backdrop-filter: blur(4px); }
.dialog form { display: flex; flex-direction: column; gap: 13px; margin: 0; }
.dialog .panel-head { margin-bottom: 0; }
.dialog .muted { margin: 0; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  transform: translateX(-50%);
  padding: 11px 18px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 11px;
  background: rgba(9, 25, 22, 0.95);
  color: #b9f6ec;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  max-width: calc(100vw - 32px);
  animation: toast-in 0.22s ease both;
}
.auth-card .field { margin-top: 12px; }
.auth-card .btn.block { margin-top: 16px; }
.passkey-btn { gap: 9px; }
.passkey-btn svg { width: 20px; height: 20px; }
.login-status {
  margin: 13px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  text-align: center;
  overflow-wrap: anywhere;
}
.setup-note { margin: 0 0 4px; }
.setup-name { margin-top: 12px; }
.auth-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 11.5px;
}
.auth-foot .dot { width: 5px; height: 5px; box-shadow: none; }
#unsupportedPanel { margin-top: 14px; }
#unsupportedPanel .form-error { margin-top: 0; }

/* ---------- animation ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.reveal { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.stats .reveal:nth-child(2) { animation-delay: 0.05s; }
.stats .reveal:nth-child(3) { animation-delay: 0.1s; }
.stats .reveal:nth-child(4) { animation-delay: 0.15s; }
.card.reveal:nth-child(2) { animation-delay: 0.04s; }
.card.reveal:nth-child(3) { animation-delay: 0.08s; }
.card.reveal:nth-child(4) { animation-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 52px; }
  .hero-panel { transform: none; max-width: 620px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 18px; }
  .topnav .pill { display: none; }
  .hero { padding-top: 38px; }
  .hero h1 { font-size: clamp(31px, 9vw, 42px); }
  .lede { font-size: 15px; }
  .section-head { align-items: stretch; flex-direction: column; gap: 14px; }
  .search { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 16px 18px; }
  .stat strong { font-size: 25px; }
  .grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .auth-card { padding: 26px 22px; }
  .dash-head { flex-direction: column; align-items: stretch; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .fields { grid-template-columns: 1fr; }
  .page-row { grid-template-columns: 1fr; gap: 10px; }
  .page-actions { justify-content: flex-start; }
  .guide-list li { grid-template-columns: 1fr; gap: 3px; }
  .card-actions { flex-wrap: wrap; }
  .card-actions .icon-btn { margin-left: auto; }
}

/* ---------- resource monitor ---------- */
.monitor-main { padding-top: 36px; padding-bottom: 84px; }
.monitor-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.monitor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.chart-panel { margin-bottom: 18px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-box {
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(8, 13, 20, 0.55);
}
.chart-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.chart-label strong { color: var(--text); font-family: var(--mono); font-size: 12px; }
.chart-box canvas { display: block; width: 100%; height: 150px; }
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 0; color: var(--text); font-family: var(--mono); font-size: 11.5px; text-align: right; overflow-wrap: anywhere; }
.storage-panel { margin-bottom: 18px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.data-table td { padding: 10px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tbody tr:first-child td { border-top: 0; }
.data-table code { color: #9fe9dd; font-size: 11px; }
.data-table strong { font-weight: 600; }
.totp-input { text-align: center; letter-spacing: 0.55em; font-family: var(--mono); font-size: 22px; padding: 12px; }
.secret-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(94, 234, 212, 0.3);
  border-radius: 10px;
  background: var(--accent-dim);
}
.secret-box code { flex: 1; color: #b9f6ec; font-size: 12.5px; overflow-wrap: anywhere; }
.uri-hint { margin-top: 8px; word-break: break-all; }
.live-pill { color: var(--accent); border-color: rgba(94, 234, 212, 0.25); }
.files-dialog { width: min(640px, calc(100vw - 32px)); max-height: 82vh; }
.files-table { max-height: 52vh; overflow: auto; }
.monitor-page .pill .dot { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- user portal ---------- */
.user-main { padding-top: 36px; padding-bottom: 84px; }
.user-main .auth-view { padding: 60px 0 30px; }
.search-wrap { display: flex; justify-content: center; margin-top: 24px; }
.user-main .grid { margin-top: 24px; }
.user-main .card-actions .btn { flex: 0 0 auto; }
.user-main .card-actions .icon-btn { margin-left: auto; }
@media (max-width: 1100px) { .monitor-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .monitor-grid { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .monitor-stats { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 1fr; gap: 3px 0; }
  .kv dd { text-align: left; margin-bottom: 6px; }
}
