/* ============================================================
   LOFTER HUB · UI
   Dark glass console · indigo / cyan accent
   ============================================================ */

:root {
  --bg: #060910;
  --bg-soft: #0a0f1a;
  --panel: rgba(16, 23, 40, 0.72);
  --panel-solid: #0f1728;
  --panel-2: rgba(24, 33, 55, 0.55);
  --line: rgba(148, 163, 184, 0.12);
  --line-strong: rgba(148, 163, 184, 0.22);
  --text: #e9eefb;
  --text-2: #b7c1d8;
  --muted: #7d89a3;
  --accent: #7c6cff;
  --accent-2: #4cc9f0;
  --accent-3: #f472b6;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;
  --radius-lg: 20px;
  --radius: 14px;
  --shadow: 0 24px 70px rgba(2, 6, 18, 0.5);
  --font-sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(124, 108, 255, 0.22), transparent 62%),
    radial-gradient(820px 480px at 100% 2%, rgba(76, 201, 240, 0.13), transparent 58%),
    radial-gradient(700px 500px at 55% 112%, rgba(244, 114, 182, 0.08), transparent 62%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(900px 600px at 50% 0%, #000 10%, transparent 78%);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

::selection { background: rgba(124, 108, 255, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(148, 163, 184, 0.38); }

.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; display: inline-block; }

/* ---------------------------------------------------------- Shell */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  flex: 0 0 250px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 15, 27, 0.92), rgba(6, 9, 16, 0.82));
  backdrop-filter: blur(18px);
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #8b7bff 0%, #5c8dff 52%, #3ed6ee 100%);
  box-shadow: 0 10px 26px rgba(92, 141, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15px; letter-spacing: 0.02em; }
.brand-text small { font-size: 9px; letter-spacing: 0.22em; color: var(--muted); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(125, 137, 163, 0.72);
  padding: 16px 12px 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--text-2);
  font-size: 13.5px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  position: relative;
}

.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: 0.82; }
.nav-item:hover { background: rgba(148, 163, 184, 0.07); color: var(--text); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(124, 108, 255, 0.2), rgba(76, 201, 240, 0.07));
  border-color: rgba(124, 108, 255, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #8b7bff, #4cc9f0);
  box-shadow: 0 0 12px rgba(124, 108, 255, 0.8);
}
.nav-lock { width: 13px !important; height: 13px !important; margin-left: auto; opacity: 0.4 !important; }

.sidebar-foot { margin-top: 14px; }
.foot-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(148, 163, 184, 0.045);
}
.foot-card .dot { margin-top: 5px; }
.foot-card div { display: flex; flex-direction: column; line-height: 1.3; }
.foot-card strong { font-size: 12px; font-weight: 600; }
.foot-card small { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.foot-meta { text-align: center; font-size: 10px; color: rgba(125, 137, 163, 0.55); letter-spacing: 0.1em; margin-top: 14px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 76px;
  padding: 0 32px;
  background: rgba(6, 9, 16, 0.66);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.page-heading { min-width: 0; }
.page-heading h1 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: 0.01em; }
.page-heading p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.045);
  font-size: 11.5px;
  color: var(--text-2);
  white-space: nowrap;
}

.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: var(--muted); display: inline-block; }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px rgba(52, 211, 153, 0.7); }
.dot.warn { background: var(--warn); box-shadow: 0 0 10px rgba(251, 191, 36, 0.6); }
.dot.err { background: var(--err); box-shadow: 0 0 10px rgba(251, 113, 133, 0.6); }
.dot.off { background: #64748b; box-shadow: none; }

.avatar-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #7c6cff, #4cc9f0);
  box-shadow: 0 6px 16px rgba(124, 108, 255, 0.3);
}

.menu-btn { display: none !important; }

.content {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 30px 32px 64px;
}

/* ---------------------------------------------------------- Generic */
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.card-head h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: 0.01em; }
.card-head p { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); }
.card-head .link { flex: 0 0 auto; margin-top: 2px; }

.link {
  font-size: 12px;
  color: #a9b6ff;
  transition: color 0.16s ease;
}
.link span { transition: transform 0.16s ease; display: inline-block; }
.link:hover { color: #c7d0ff; }
.link:hover span { transform: translateX(3px); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 17px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.18s ease;
  white-space: nowrap;
  user-select: none;
}
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #7c6cff 0%, #5f8bff 52%, #45c8ee 100%);
  box-shadow: 0 10px 26px rgba(95, 139, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(95, 139, 255, 0.42); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-ghost {
  color: var(--text-2);
  border-color: var(--line-strong);
  background: rgba(148, 163, 184, 0.055);
}
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: rgba(148, 163, 184, 0.4); background: rgba(148, 163, 184, 0.1); }
.btn-danger {
  color: #ffc2cb;
  border-color: rgba(251, 113, 133, 0.32);
  background: rgba(251, 113, 133, 0.1);
}
.btn-danger:hover:not(:disabled) { background: rgba(251, 113, 133, 0.18); border-color: rgba(251, 113, 133, 0.5); }
.btn-sm { height: 33px; padding: 0 13px; font-size: 12px; border-radius: 9px; }
.btn-xs { height: 27px; padding: 0 10px; font-size: 11px; border-radius: 7px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.05);
  color: var(--text-2);
}
.icon-btn svg { width: 19px; height: 19px; }

.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.06);
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--text-2);
  background: rgba(148, 163, 184, 0.06);
  white-space: nowrap;
}
.badge.ok { color: #86efac; border-color: rgba(52, 211, 153, 0.28); background: rgba(52, 211, 153, 0.1); }
.badge.off { color: #fda4af; border-color: rgba(251, 113, 133, 0.28); background: rgba(251, 113, 133, 0.09); }
.badge.warn { color: #fde68a; border-color: rgba(251, 191, 36, 0.28); background: rgba(251, 191, 36, 0.09); }

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 13px;
  font-size: 12.5px;
  margin-bottom: 18px;
  border: 1px solid;
}
.alert svg { width: 17px; height: 17px; flex: 0 0 17px; }
.alert a { margin-left: auto; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.alert-warn { color: #fde68a; border-color: rgba(251, 191, 36, 0.28); background: rgba(251, 191, 36, 0.07); }
.alert-error { color: #fecdd3; border-color: rgba(251, 113, 133, 0.3); background: rgba(251, 113, 133, 0.09); }

.inline-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--line);
  color: #c9d4f5;
}

.hint { font-size: 11px; color: var(--muted); }
.req { color: var(--err); }

/* ---------------------------------------------------------- Hero */
.hero {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 30px;
  padding: 40px 42px;
  margin-bottom: 20px;
  background:
    radial-gradient(700px 300px at 0% 0%, rgba(124, 108, 255, 0.18), transparent 60%),
    radial-gradient(600px 320px at 100% 100%, rgba(76, 201, 240, 0.1), transparent 60%),
    linear-gradient(135deg, rgba(19, 27, 48, 0.9), rgba(10, 15, 27, 0.82));
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(124, 108, 255, 0.45), rgba(76, 201, 240, 0.18) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #a9b6ff;
  text-transform: uppercase;
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero h2 {
  margin: 16px 0 12px;
  font-size: 38px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero h2 em {
  font-style: normal;
  background: linear-gradient(100deg, #a79bff 0%, #7dc8ff 48%, #5ee7de 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { margin: 0 0 24px; max-width: 520px; color: var(--text-2); font-size: 13.5px; line-height: 1.8; }
.hero-actions { display: flex; gap: 11px; flex-wrap: wrap; }

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 220px; }
.terminal {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 15px;
  background: rgba(5, 9, 17, 0.85);
  box-shadow: 0 30px 70px rgba(2, 6, 18, 0.65);
  transform: rotate(-1.6deg);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.04);
}
.terminal-bar i { width: 8px; height: 8px; border-radius: 50%; background: #fb7185; }
.terminal-bar i:nth-child(2) { background: #fbbf24; }
.terminal-bar i:nth-child(3) { background: #34d399; }
.terminal-bar span { margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); }
.terminal pre {
  margin: 0;
  padding: 18px 20px 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.85;
  color: #c9d4f5;
  overflow: auto;
}
.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(124, 108, 255, 0.16);
  pointer-events: none;
}
.orbit-a { width: 320px; height: 320px; top: -40px; right: -70px; }
.orbit-b { width: 460px; height: 460px; bottom: -160px; left: -80px; border-color: rgba(76, 201, 240, 0.1); }

/* ---------------------------------------------------------- Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat { padding: 18px 20px 16px; overflow: hidden; }
.stat::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124, 108, 255, 0.55), rgba(76, 201, 240, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.stat:hover::after { opacity: 1; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11.5px; }
.stat-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #b9c3ff;
  background: rgba(124, 108, 255, 0.12);
  border: 1px solid rgba(124, 108, 255, 0.2);
}
.stat-icon.ok { color: #86efac; background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.2); }
.stat-value { display: block; margin: 10px 0 3px; font-size: 30px; line-height: 1; font-weight: 680; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-value i { font-style: normal; font-size: 13px; color: var(--muted); margin-left: 3px; font-weight: 500; }
.stat small { color: var(--muted); font-size: 10.5px; }

/* ---------------------------------------------------------- Layout grids */
.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 20px;
  align-items: start;
}
.side-stack { display: flex; flex-direction: column; gap: 20px; }

.endpoint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 12px;
}
.endpoint-card {
  position: relative;
  padding: 16px 16px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.035);
  transition: all 0.18s ease;
  overflow: hidden;
}
.endpoint-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 108, 255, 0.35);
  background: rgba(124, 108, 255, 0.06);
  box-shadow: 0 12px 30px rgba(2, 6, 18, 0.35);
}
.endpoint-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.endpoint-group { font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }
.endpoint-card strong { display: block; font-size: 14px; margin-bottom: 5px; }
.endpoint-card code { display: block; font-family: var(--font-mono); font-size: 10.5px; color: #93a7e8; margin-bottom: 9px; }
.endpoint-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.endpoint-arrow {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 13px;
  color: rgba(148, 163, 184, 0.5);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.18s ease;
}
.endpoint-card:hover .endpoint-arrow { opacity: 1; transform: translateX(0); color: #a9b6ff; }

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}
.method.get { color: #7dd3fc; background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.24); }
.method.post { color: #86efac; background: rgba(52, 211, 153, 0.09); border-color: rgba(52, 211, 153, 0.22); }

/* ---------------------------------------------------------- Status / mini log */
.status-list { display: flex; flex-direction: column; }
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.09);
  font-size: 12.5px;
  color: var(--text-2);
}
.status-row:last-child { border-bottom: 0; }
.status-row .mono { color: var(--text); }

.mini-log { list-style: none; margin: 0 0 4px; padding: 0; }
.mini-log li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.08);
}
.mini-log li:last-child { border-bottom: 0; }
.mini-log div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.mini-log strong { font-size: 12px; font-weight: 600; }
.mini-log small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-status { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }

.empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-size: 12px;
}
.empty.small { padding: 20px 14px; }

.muted-card { padding: 24px; text-align: center; }
.muted-card h3 { margin: 10px 0 6px; font-size: 14px; }
.muted-card p { margin: 0 0 16px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.muted-icon { font-size: 22px; opacity: 0.8; }

/* ---------------------------------------------------------- Debug */
.debug-layout {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.debug-side {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
  padding: 14px;
}
.debug-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(6, 9, 16, 0.5);
  margin-bottom: 12px;
}
.debug-search svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 15px; }
.debug-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; }
.debug-search input::placeholder { color: rgba(125, 137, 163, 0.7); }

.api-list { overflow: auto; flex: 1; padding-right: 2px; }
.api-group { margin-bottom: 6px; }
.api-group-title { padding: 10px 9px 6px; font-size: 9.5px; letter-spacing: 0.16em; color: rgba(125, 137, 163, 0.66); text-transform: uppercase; }
.api-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  transition: all 0.16s ease;
}
.api-item:hover { background: rgba(148, 163, 184, 0.06); }
.api-item.active { background: rgba(124, 108, 255, 0.12); border-color: rgba(124, 108, 255, 0.25); }
.api-item-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.api-item-text strong { font-size: 12px; font-weight: 600; color: var(--text-2); }
.api-item.active .api-item-text strong { color: #fff; }
.api-item-text small { font-family: var(--font-mono); font-size: 9px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.debug-side-foot { padding: 12px 8px 2px; font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--line); margin-top: 8px; }

.api-panel { padding: 26px 28px 28px; min-height: 640px; }
.api-panel-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.api-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.api-title-row h2 { margin: 0; font-size: 21px; font-weight: 680; letter-spacing: -0.01em; }
.path-code {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #9fb2ef;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(6, 9, 16, 0.45);
  border: 1px solid var(--line);
}
.api-desc { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.75; max-width: 900px; }
.upstream { display: flex; align-items: center; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.upstream-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; color: rgba(125, 137, 163, 0.7); }
.upstream code { font-family: var(--font-mono); font-size: 10.5px; color: #8fa3d9; }

.api-form-wrap { padding: 20px 0 4px; }
.section-label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(125, 137, 163, 0.7); margin-bottom: 12px; }

.param-grid, .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.param-grid .field.span-2, .form-grid .field.span-2 { grid-column: span 2; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 11.5px; color: var(--text-2); font-weight: 550; }
.field-help { font-size: 10.5px; color: var(--muted); }
.field input, .field select, .field textarea, .small-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(6, 9, 16, 0.55);
  padding: 10px 12px;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  color: var(--text);
}
.field textarea { resize: vertical; line-height: 1.65; font-family: var(--font-mono); font-size: 11.5px; }
.field input:focus, .field select:focus, .field textarea:focus, .small-input:focus {
  border-color: rgba(124, 108, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.12);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(125, 137, 163, 0.6); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7d89a3 50%), linear-gradient(135deg, #7d89a3 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.check-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; min-height: 40px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 14px; height: 14px; }

.input-with-btn { display: flex; gap: 9px; align-items: center; }
.input-with-btn input { flex: 1; }

.api-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 20px 0 6px; }
.api-actions .hint { margin-left: auto; }

.response-wrap { margin-top: 10px; }
.response-empty {
  padding: 46px 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
}
.empty-orb {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #a9b6ff;
  background: radial-gradient(circle at 35% 30%, rgba(124, 108, 255, 0.32), rgba(124, 108, 255, 0.06) 70%);
  border: 1px solid rgba(124, 108, 255, 0.24);
}
.response-empty h3 { margin: 0 0 6px; font-size: 13.5px; color: var(--text-2); }
.response-empty p { margin: 0; font-size: 11.5px; }

.response-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: rgba(6, 9, 16, 0.5);
}
.resp-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.resp-badge {
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  border: 1px solid var(--line);
  color: var(--text-2);
  background: rgba(148, 163, 184, 0.06);
}
.resp-badge.ok { color: #86efac; border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.09); }
.resp-badge.err { color: #fda4af; border-color: rgba(251, 113, 133, 0.34); background: rgba(251, 113, 133, 0.09); }
.resp-tabs { display: flex; gap: 3px; margin-left: auto; background: rgba(148, 163, 184, 0.06); padding: 3px; border-radius: 8px; }
.resp-tabs button {
  height: 25px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 10.5px;
  color: var(--muted);
}
.resp-tabs button.active { color: #fff; background: rgba(124, 108, 255, 0.28); }

.code-block {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  background: rgba(4, 7, 14, 0.8);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.8;
  color: #c9d4f5;
  overflow: auto;
  max-height: 560px;
  white-space: pre-wrap;
  word-break: break-word;
}
.code-block:first-child { border-radius: 12px; }

.j-key { color: #9db4ff; }
.j-str { color: #a7e6c8; }
.j-num { color: #f4b8d8; }
.j-bool { color: #f7cf83; }
.j-null { color: #8b95ad; font-style: italic; }

/* ---------------------------------------------------------- Parse */
.parse-card { padding: 26px 28px; margin-bottom: 20px; }
.parse-card .card-head { margin-bottom: 20px; }
.parse-card .card-head p code { margin: 0 2px; }
.example-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 8px; margin-bottom: 18px; font-size: 10.5px; color: var(--muted); }
.chip-btn {
  height: 25px;
  padding: 0 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.05);
  color: var(--text-2);
  font-size: 10.5px;
}
.chip-btn:hover { border-color: rgba(124, 108, 255, 0.4); color: #fff; background: rgba(124, 108, 255, 0.1); }
.parse-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.parse-actions .hint { margin-left: 0; }

.error-card { display: flex; gap: 14px; padding: 20px 24px; border-color: rgba(251, 113, 133, 0.3); background: rgba(251, 113, 133, 0.06); margin-bottom: 20px; }
.error-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 34px; color: #fecdd3; font-weight: 800; background: rgba(251, 113, 133, 0.16); border: 1px solid rgba(251, 113, 133, 0.3); }
.error-card h3 { margin: 2px 0 4px; font-size: 14px; color: #fecdd3; }
.error-card p { margin: 0 0 6px; color: #fda4af; font-size: 12px; }

.parse-result { display: flex; flex-direction: column; gap: 20px; }
.result-card { padding: 24px 26px; }
.result-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.type-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 650;
  color: #d9e0ff;
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.3), rgba(76, 201, 240, 0.16));
  border: 1px solid rgba(124, 108, 255, 0.35);
}
.result-head .link { margin-left: auto; }
.probe-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.055);
  font-size: 11px;
  color: #a7e6c8;
  margin-bottom: 20px;
}
.probe-strip b { color: #eafff6; font-family: var(--font-mono); font-weight: 600; }
.probe-strip > span { min-width: 0; overflow-wrap: anywhere; }
.probe-strip.warn { border-color: rgba(251, 191, 36, 0.25); background: rgba(251, 191, 36, 0.06); color: #fde68a; }

.story { display: flex; flex-direction: column; gap: 14px; }
.story-author { display: flex; align-items: center; gap: 11px; }
.story-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); background: rgba(148, 163, 184, 0.1); }
.story-author-info { display: flex; flex-direction: column; line-height: 1.35; }
.story-author-info strong { font-size: 13px; }
.story-author-info small { font-size: 10.5px; color: var(--muted); }
.story h2 { margin: 0; font-size: 24px; line-height: 1.42; letter-spacing: -0.01em; }
.story-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.story-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tag-list { display: flex; gap: 7px; flex-wrap: wrap; }
.tag { font-size: 10.5px; color: #c3cbf1; padding: 3px 9px; border-radius: 99px; background: rgba(124, 108, 255, 0.1); border: 1px solid rgba(124, 108, 255, 0.2); }

.tabs { display: flex; gap: 3px; padding: 3px; border-radius: 9px; background: rgba(148, 163, 184, 0.06); width: fit-content; }
.tabs button { height: 28px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; }
.tabs button.active { color: #fff; background: rgba(124, 108, 255, 0.3); }

.reader-frame {
  width: 100%;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(6, 9, 16, 0.45);
}
.reader-note { font-size: 10.5px; color: var(--muted); margin-top: 8px; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.post-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(148, 163, 184, 0.035);
  transition: all 0.18s ease;
}
.post-card:hover { border-color: rgba(124, 108, 255, 0.35); background: rgba(124, 108, 255, 0.06); transform: translateY(-2px); }
.post-card strong { font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card p { margin: 0; font-size: 10.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card small { font-family: var(--font-mono); color: rgba(125, 137, 163, 0.8); font-size: 9.5px; }

.collection-hero { display: flex; gap: 16px; align-items: flex-start; }
.collection-cover { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line-strong); }
.collection-info h2 { margin: 0 0 6px; font-size: 21px; }
.collection-info p { margin: 0 0 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.section-title h3 { margin: 0; font-size: 14px; }
.section-title span { font-size: 11px; color: var(--muted); }

.raw-details { border: 1px solid var(--line); border-radius: 12px; background: rgba(6, 9, 16, 0.4); overflow: hidden; }
.raw-details summary { padding: 12px 16px; cursor: pointer; font-size: 12px; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.raw-details summary::-webkit-details-marker { display: none; }
.raw-details summary::before { content: "＋"; font-family: var(--font-mono); color: var(--muted); }
.raw-details[open] summary::before { content: "－"; }
.raw-details .code-block { border: 0; border-top: 1px solid var(--line); border-radius: 0; max-height: 420px; }

/* ---------------------------------------------------------- Logs */
.logs-card { padding: 20px 22px; }
.log-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.log-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(6, 9, 16, 0.5);
  min-width: 280px;
  flex: 1;
  max-width: 440px;
}
.log-search svg { width: 14px; height: 14px; color: var(--muted); flex: 0 0 14px; }
.log-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; }
.log-toolbar select { height: 36px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 9px; background-color: rgba(6, 9, 16, 0.5); font-size: 11.5px; outline: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7d89a3 50%), linear-gradient(135deg, #7d89a3 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.auto-refresh { height: 36px; padding: 0 4px; }
.log-summary { font-size: 10.5px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 14px; flex-wrap: wrap; }
.table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: auto; background: rgba(6, 9, 16, 0.3); }
.log-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.log-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.045);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.log-table td { padding: 11px 14px; border-bottom: 1px solid rgba(148, 163, 184, 0.07); font-size: 11.5px; color: var(--text-2); vertical-align: middle; }
.log-table tr:last-child td { border-bottom: 0; }
.log-table tbody tr { cursor: pointer; transition: background 0.15s ease; }
.log-table tbody tr:hover { background: rgba(124, 108, 255, 0.055); }
.log-time { font-family: var(--font-mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.log-endpoint { display: flex; flex-direction: column; line-height: 1.35; }
.log-endpoint strong { font-size: 11.5px; font-weight: 600; color: var(--text); }
.log-endpoint small { font-family: var(--font-mono); font-size: 9px; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 10px; }
.status-pill .dot { width: 6px; height: 6px; flex: 0 0 6px; }
.log-params { font-family: var(--font-mono); font-size: 9.5px; color: rgba(125, 137, 163, 0.85); display: block; max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-empty { padding: 40px; text-align: center; color: var(--muted); font-size: 12px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.page-info { font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------- Admin */
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.admin-grid .card { padding: 24px 24px; }
.admin-grid .span-2 { grid-column: span 2; }

.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(148, 163, 184, 0.035); margin-bottom: 16px; }
.setting-row strong { font-size: 13px; }
.setting-row p { margin: 3px 0 0; font-size: 10.5px; color: var(--muted); }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 46px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.22);
  transition: all 0.2s ease;
  border: 1px solid var(--line-strong);
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e2e8f6;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(2, 6, 18, 0.4);
}
.switch input:checked + .track { background: linear-gradient(135deg, #7c6cff, #4cc9f0); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(20px); background: #fff; }

.cookie-current { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 13px; border: 1px dashed var(--line-strong); border-radius: 10px; margin-bottom: 14px; background: rgba(6, 9, 16, 0.35); }
.cookie-label { font-size: 10px; letter-spacing: 0.1em; color: var(--muted); }
.cookie-current code { font-family: var(--font-mono); font-size: 10.5px; color: #9fb2ef; word-break: break-all; }
.cookie-length { font-size: 10px; color: var(--muted); margin-left: auto; }
.cookie-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.small-input { width: 170px; height: 33px; padding: 0 10px; border-radius: 8px; font-size: 11px; }

.test-result { margin-top: 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(148, 163, 184, 0.04); font-size: 11.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.test-result.ok { border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.06); color: #a7e6c8; }
.test-result.err { border-color: rgba(251, 113, 133, 0.3); background: rgba(251, 113, 133, 0.06); color: #fecdd3; }
.test-result img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.test-result b { font-weight: 650; }

.system-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }

/* ---------------------------------------------------------- Toast / Modal */
.toast-root { position: fixed; top: 88px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(12, 18, 32, 0.96);
  box-shadow: 0 18px 46px rgba(2, 6, 18, 0.55);
  color: var(--text-2);
  font-size: 12px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  pointer-events: auto;
  animation: toastIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.out { opacity: 0; transform: translateY(-6px); }
.toast .t-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: 0 0 7px; background: var(--accent-2); }
.toast.success .t-dot { background: var(--ok); }
.toast.error .t-dot { background: var(--err); }
.toast b { display: block; font-size: 12px; color: var(--text); margin-bottom: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal-root { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.66);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: auto;
}
.modal-overlay.show { opacity: 1; }
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(560px, 94vw);
  background: #0b111e;
  border-left: 1px solid var(--line-strong);
  box-shadow: -30px 0 70px rgba(2, 6, 18, 0.55);
  transform: translateX(100%);
  transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 15px; }
.drawer-head p { margin: 3px 0 0; font-size: 10.5px; color: var(--muted); }
.drawer-close { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: rgba(148, 163, 184, 0.06); color: var(--muted); font-size: 16px; line-height: 1; }
.drawer-body { padding: 20px 22px 40px; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.detail-item { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(148, 163, 184, 0.03); }
.detail-item span { font-size: 9.5px; color: var(--muted); letter-spacing: 0.06em; }
.detail-item strong { font-size: 11.5px; font-weight: 550; word-break: break-all; }
.detail-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(125, 137, 163, 0.7); margin-bottom: -6px; }

/* ---------------------------------------------------------- Login */
.login-body { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; }
.login-ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; }
.glow-a { width: 520px; height: 520px; left: 8%; top: -12%; background: rgba(124, 108, 255, 0.4); }
.glow-b { width: 460px; height: 460px; right: 6%; bottom: -14%; background: rgba(76, 201, 240, 0.25); }
.grid-mask {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image: linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(700px 500px at 50% 45%, #000 10%, transparent 80%);
}
.login-shell { width: min(420px, 92vw); display: flex; flex-direction: column; align-items: center; padding: 40px 0; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-card { width: 100%; padding: 32px 30px 24px; background: rgba(13, 19, 33, 0.78); }
.login-head { text-align: left; margin-bottom: 20px; }
.login-head h1 { margin: 12px 0 6px; font-size: 24px; letter-spacing: -0.01em; }
.login-head p { margin: 0; font-size: 12px; color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form .btn { margin-top: 4px; height: 42px; }
.login-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.login-foot a:hover { color: var(--text); }
.login-copyright { margin: 22px 0 0; font-size: 10px; color: rgba(125, 137, 163, 0.6); letter-spacing: 0.04em; }
.login-card .alert { margin-bottom: 16px; }

/* ---------------------------------------------------------- Responsive */
@media (max-width: 1280px) {
  .hero { grid-template-columns: 1.2fr 0.8fr; padding: 34px; }
  .hero h2 { font-size: 32px; }
  .hero-visual { min-height: 200px; }
}

@media (max-width: 1080px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .side-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .debug-layout { grid-template-columns: 244px minmax(0, 1fr); }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-grid .span-2 { grid-column: auto; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-102%);
    transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
    width: 262px;
    box-shadow: 30px 0 70px rgba(2, 6, 18, 0.6);
  }
  .sidebar.open { transform: none; }
  .sidebar-mask {
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(3, 6, 12, 0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }
  .sidebar-mask.show { opacity: 1; pointer-events: auto; }
  .menu-btn { display: grid !important; }
  .topbar { padding: 0 20px; gap: 14px; height: 68px; }
  .page-heading h1 { font-size: 16px; }
  .content { padding: 22px 20px 50px; }
  .hero { grid-template-columns: 1fr; padding: 28px; }
  .hero-visual { display: none; }
  .debug-layout { grid-template-columns: minmax(0, 1fr); }
  .debug-side { position: relative; top: 0; max-height: none; }
  .api-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
  .api-group { display: contents; }
  .api-group-title { display: none; }
  .api-item { flex: 0 0 auto; width: auto; border: 1px solid var(--line); }
  .debug-side-foot { display: none; }
  .api-panel { min-height: 480px; padding: 22px 20px; }
}

@media (max-width: 680px) {
  .topbar { padding: 0 14px; }
  .page-heading p { display: none; }
  .hide-sm { display: none; }
  .content { padding: 16px 14px 44px; }
  .hero { padding: 24px 20px; }
  .hero h2 { font-size: 27px; }
  .hero p { font-size: 12.5px; }
  .stat-grid { gap: 10px; }
  .stat { padding: 15px 16px; }
  .stat-value { font-size: 25px; }
  .card { border-radius: 16px; }
  .side-stack { grid-template-columns: minmax(0, 1fr); }
  .param-grid, .form-grid, .form-grid.two { grid-template-columns: minmax(0, 1fr); }
  .param-grid .field.span-2, .form-grid .field.span-2 { grid-column: auto; }
  .api-actions .hint { display: none; }
  .api-title-row h2 { font-size: 18px; }
  .log-toolbar { gap: 7px; }
  .log-search { min-width: 100%; max-width: none; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .result-card { padding: 20px 18px; }
  .story h2 { font-size: 20px; }
  .parse-card { padding: 20px 18px; }
  .admin-grid .card { padding: 20px 18px; }
  .login-card { padding: 26px 22px 20px; }
  .toast-root { top: auto; left: 14px; right: 14px; bottom: 20px; align-items: stretch; }
  .toast { min-width: 0; max-width: none; width: 100%; }
}
