:root {
  --bg: #05060d;
  --ink: #e9edff;
  --muted: #8b93b8;
  --line: rgba(255, 255, 255, 0.08);
  --glass: rgba(14, 18, 36, 0.58);
  --glass-strong: rgba(18, 23, 44, 0.9);
  --cyan: #62e6ff;
  --violet: #a78bfa;
  --pink: #ff7ac6;
  --radius: 16px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: inherit; }
.muted { color: var(--muted); font-size: 12px; }

#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.aurora {
  position: fixed; border-radius: 50%; filter: blur(100px); opacity: .35; z-index: 0; pointer-events: none;
}
.a1 { width: 46vw; height: 46vw; left: -14vw; top: -16vw; background: radial-gradient(circle, rgba(98,230,255,.5), transparent 65%); }
.a2 { width: 40vw; height: 40vw; right: -12vw; bottom: -16vw; background: radial-gradient(circle, rgba(167,139,250,.45), transparent 65%); }

.admin-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 14px min(4vw, 34px);
  background: rgba(5, 6, 13, .72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 700; letter-spacing: .16em; font-size: 12px;
}
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 12px var(--cyan);
}
.tag {
  font-family: Consolas, monospace;
  font-size: 10px; letter-spacing: .18em; color: var(--cyan);
  padding: 3px 8px; border: 1px solid rgba(98, 230, 255, .3); border-radius: 4px;
}
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-right .muted { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ghost-btn, .primary-btn {
  border-radius: 999px; padding: 7px 15px;
  font-size: 12px; font-family: inherit; cursor: pointer; text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.ghost-btn { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.ghost-btn:hover { border-color: rgba(98, 230, 255, .45); }
.primary-btn {
  border: 0; color: #05060d; font-weight: 700;
  background: linear-gradient(120deg, var(--cyan), var(--violet) 65%, var(--pink));
}
.primary-btn:hover { transform: translateY(-1px); }
.primary-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.layout {
  position: relative; z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px min(4vw, 34px) 70px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
}
.side { display: flex; flex-direction: column; gap: 5px; position: sticky; top: 86px; align-self: start; }
.tab {
  border: 1px solid transparent; background: transparent;
  color: var(--muted); text-align: left;
  padding: 10px 14px; border-radius: 10px;
  font-family: inherit; font-size: 13px; cursor: pointer;
}
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .04); }
.tab.active { color: var(--ink); background: rgba(98, 230, 255, .1); border-color: rgba(98, 230, 255, .22); }

.content { min-width: 0; }
.panel h1 { margin: 0 0 20px; font-size: 24px; letter-spacing: .04em; font-weight: 700; }
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { padding: 16px 18px; }
.stat-card span { display: block; font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.stat-card b { display: block; margin-top: 5px; font-size: 24px; font-weight: 700; }
.stat-card small { color: var(--muted); font-size: 10px; }
.panel-block { padding: 18px; margin-bottom: 14px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.block-head h2 { margin: 0; font-size: 14px; letter-spacing: .06em; }
.disk-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.disk-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width .4s ease; }
.mini-list { display: grid; gap: 6px; font-size: 12px; }
.mini-list div { display: flex; gap: 10px; color: var(--muted); }
.mini-list b { color: var(--ink); font-weight: 500; }

.inline-form { display: flex; gap: 10px; padding: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.inline-form input, .inline-form select {
  padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .25);
  color: var(--ink); font-family: inherit; font-size: 13px; outline: none;
}
.inline-form input { flex: 1 1 220px; }
.inline-form input:focus, .inline-form select:focus { border-color: rgba(98, 230, 255, .5); }
.hint { color: var(--muted); font-size: 11.5px; margin: 8px 2px 16px; }
.codes { padding: 14px 16px; margin-bottom: 14px; }
.codes p { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.code-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px; border-radius: 8px; background: rgba(98, 230, 255, .07);
  font-family: Consolas, monospace; font-size: 13px; letter-spacing: .05em;
  margin-bottom: 6px;
}
.code-line button { border: 0; background: none; color: var(--cyan); cursor: pointer; font-family: inherit; font-size: 11px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .06); vertical-align: top; }
th { font-size: 10px; letter-spacing: .12em; color: var(--muted); font-weight: 500; white-space: nowrap; }
td { color: #d9e1ff; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }
td .clip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.row-actions button { white-space: nowrap; }
.pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 10px; border: 1px solid var(--line); color: var(--muted);
}
.pill.ok { color: #61e6a8; border-color: rgba(97, 230, 168, .35); background: rgba(97, 230, 168, .08); }
.pill.warn { color: #ffb86b; border-color: rgba(255, 184, 107, .35); background: rgba(255, 184, 107, .08); }
.pill.bad { color: #ff7d9b; border-color: rgba(255, 125, 155, .35); background: rgba(255, 125, 155, .08); }
.pill.info { color: var(--cyan); border-color: rgba(98, 230, 255, .35); background: rgba(98, 230, 255, .08); }

.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.gate-card { max-width: 380px; padding: 30px; text-align: center; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 20px; }
.gate-card h2 { margin: 0 0 8px; font-size: 18px; }
.gate-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }

.modal { position: fixed; inset: 0; z-index: 90; background: rgba(3, 4, 10, .75); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; }
.modal-card { width: min(440px, 100%); padding: 24px; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 18px; }
.modal-card h3 { margin: 0 0 10px; font-size: 16px; }
.reveal-text {
  font-family: Consolas, monospace; font-size: 15px; letter-spacing: .06em;
  background: rgba(98, 230, 255, .08); border: 1px dashed rgba(98, 230, 255, .3);
  padding: 14px; border-radius: 10px; overflow-wrap: anywhere; user-select: all;
}
.secret { letter-spacing: .18em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 8px; max-width: min(340px, calc(100vw - 36px)); }
.toast {
  padding: 11px 14px; border-radius: 10px;
  background: var(--glass-strong); border: 1px solid var(--line);
  font-size: 12.5px; box-shadow: 0 16px 36px rgba(0, 0, 0, .5);
}
.toast.err { border-color: rgba(255, 90, 120, .45); }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; padding-top: 14px; }
  .side { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .tab { white-space: nowrap; }
  .tag { display: none; }
  .top-right .muted { display: none; }
}
.link-btn {
  border: 0; background: none; color: var(--cyan);
  font-family: inherit; font-size: 12px; cursor: pointer; padding: 2px 0;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: #ff7d9b; }
