/**
 * public/admin.css
 * ------------------------------------------------------------
 * 深色霓虹风格样式
 * ------------------------------------------------------------
 */
:root {
  --bg: #081120;
  --bg-2: #0c1830;
  --card: rgba(15, 27, 51, 0.88);
  --card-2: rgba(20, 38, 71, 0.88);
  --line: rgba(0, 238, 255, 0.24);
  --line-strong: rgba(0, 238, 255, 0.6);
  --text: #eafcff;
  --muted: #8eb8c5;
  --cyan: #00eaff;
  --cyan-2: #00bcd4;
  --green: #2bffb5;
  --red: #ff6a8b;
  --shadow: 0 0 0 1px rgba(0,238,255,.08), 0 12px 40px rgba(0,0,0,.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(0, 234, 255, 0.10), transparent 30%),
    radial-gradient(circle at bottom right, rgba(43, 255, 181, 0.08), transparent 30%),
    linear-gradient(180deg, #07111d 0%, #0a1426 100%);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 234, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 234, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.35));
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.bg-glow-1 {
  width: 300px;
  height: 300px;
  background: rgba(0, 234, 255, 0.12);
  top: 40px;
  left: -60px;
}

.bg-glow-2 {
  width: 360px;
  height: 360px;
  background: rgba(43, 255, 181, 0.08);
  right: -120px;
  top: 240px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
  background: rgba(5, 12, 24, 0.55);
  border-bottom: 1px solid rgba(0, 234, 255, 0.08);
}

.topbar-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: 1px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.brand-text {
  color: var(--cyan);
}

.topnav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  transition: .2s ease;
}

.topnav a:hover {
  color: var(--text);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 60px;
}

.hero {
  text-align: center;
  padding: 28px 20px 12px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(0, 234, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 234, 255, 0.12);
  margin-bottom: 18px;
  font-size: 14px;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.hero-logo-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 18px rgba(0, 234, 255, 0.25));
}

.hero-title {
  margin: 0;
  font-size: clamp(30px, 6vw, 56px);
  letter-spacing: 1px;
}

.hero-subtitle {
  margin: 10px 0 6px;
  color: var(--cyan);
  font-weight: 700;
  font-size: 20px;
}

.hero-desc {
  margin: 0 auto;
  max-width: 720px;
  color: var(--muted);
}

.panel {
  background: linear-gradient(180deg, rgba(16, 28, 53, .92), rgba(10, 20, 40, .95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-header h2 {
  margin: 0;
  font-size: 24px;
}

.panel-tag {
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  background: rgba(0, 234, 255, 0.07);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(9, 23, 43, .85), rgba(7, 18, 34, .92));
  border: 1px solid rgba(0, 234, 255, 0.16);
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--cyan);
}

.stat-code code {
  font-size: 14px;
  word-break: break-all;
}

.alert {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 600;
}

.alert-success {
  background: rgba(43, 255, 181, 0.10);
  border: 1px solid rgba(43, 255, 181, 0.35);
  color: #9dffd9;
}

.alert-error {
  background: rgba(255, 106, 139, 0.10);
  border: 1px solid rgba(255, 106, 139, 0.35);
  color: #ffb5c4;
}

.input-label {
  display: block;
  margin-bottom: 8px;
  color: #d6f9ff;
  font-weight: 700;
}

.neon-input,
.neon-textarea {
  width: 100%;
  border: 1px solid rgba(0, 234, 255, 0.22);
  border-radius: 14px;
  background: rgba(4, 12, 26, 0.88);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
  transition: .2s ease;
}

.neon-input:focus,
.neon-textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(0, 234, 255, 0.08);
}

.neon-textarea {
  resize: vertical;
  min-height: 160px;
}

.copy-row {
  display: flex;
  gap: 12px;
}

.neon-btn {
  appearance: none;
  border: 1px solid rgba(0, 234, 255, 0.45);
  background: linear-gradient(135deg, rgba(0,234,255,.16), rgba(43,255,181,.14));
  color: var(--text);
  border-radius: 14px;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: .18s ease;
  white-space: nowrap;
}

.neon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 234, 255, 0.16);
}

.neon-btn.wide {
  width: 100%;
  margin-top: 14px;
}

.neon-btn.danger {
  border-color: rgba(255, 106, 139, 0.5);
  background: linear-gradient(135deg, rgba(255,106,139,.14), rgba(255,77,109,.10));
}

.neon-btn.ghost {
  background: transparent;
}

.neon-btn.small {
  padding: 9px 12px;
  font-size: 13px;
}

.link-btn.ghost {
  background: transparent;
}

.sub-box {
  display: grid;
  gap: 12px;
}

.hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.qrcode-wrap {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

#qrcode-canvas {
  width: 180px;
  height: 180px;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-btn {
  border: 1px solid rgba(0, 234, 255, 0.20);
  background: rgba(5, 15, 30, 0.72);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.tab-btn.active {
  color: var(--text);
  border-color: rgba(0, 234, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(0, 234, 255, 0.08);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.form-card {
  padding: 6px 0 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.data-list {
  display: grid;
  gap: 10px;
  max-height: 500px;
  overflow: auto;
  padding-right: 4px;
}

.data-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  background: rgba(8, 18, 36, 0.84);
  border: 1px solid rgba(0, 234, 255, 0.10);
}

.data-item code {
  white-space: pre-wrap;
  word-break: break-all;
  color: #dbfaff;
}

.data-index {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 234, 255, 0.10);
  color: var(--cyan);
  font-weight: 800;
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(0, 234, 255, 0.16);
  border-radius: 14px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(8, 18, 36, 0.84);
  border: 1px solid rgba(0, 234, 255, 0.10);
}

.info-item span {
  color: var(--muted);
}

.info-item code {
  word-break: break-all;
}

.node-grid {
  display: grid;
  gap: 12px;
  max-height: 700px;
  overflow: auto;
  padding-right: 4px;
}

.node-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(8, 18, 36, 0.88);
  border: 1px solid rgba(0, 234, 255, 0.12);
  display: grid;
  gap: 12px;
}

.node-card-disabled {
  opacity: .72;
  border-color: rgba(255, 106, 139, 0.22);
}

.node-card-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
}

.node-card-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 234, 255, 0.10);
  color: var(--cyan);
  font-weight: 800;
}

.node-card-main {
  min-width: 0;
}

.node-card-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.node-card-title {
  margin: 0;
  font-size: 18px;
}

.node-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--cyan);
  border: 1px solid rgba(0, 234, 255, 0.28);
  background: rgba(0, 234, 255, 0.08);
}

.node-chip-green {
  color: #9dffd9;
  border-color: rgba(43, 255, 181, 0.28);
  background: rgba(43, 255, 181, 0.08);
}

.node-chip-red {
  color: #ffb5c4;
  border-color: rgba(255, 106, 139, 0.28);
  background: rgba(255, 106, 139, 0.08);
}

.node-card-remark {
  color: var(--muted);
  line-height: 1.6;
  word-break: break-word;
}

.node-card-raw {
  padding: 12px;
  border-radius: 12px;
  background: rgba(4, 12, 26, 0.9);
  border: 1px solid rgba(0, 234, 255, 0.08);
}

.node-card-raw code {
  white-space: pre-wrap;
  word-break: break-all;
  color: #dbfaff;
  font-size: 13px;
}

.node-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-form {
  display: inline;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--text);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 20, 0.75);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 20px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  width: min(720px, 100%);
  background: linear-gradient(180deg, rgba(16, 28, 53, .96), rgba(10, 20, 40, .98));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 0;
  font-size: 22px;
}

.modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(0, 234, 255, 0.24);
  background: rgba(0, 234, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
}

@media (max-width: 900px) {
  .stats-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    width: min(100% - 18px, 100%);
    padding: 8px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .page-shell {
    width: min(100% - 18px, 100%);
    margin-top: 12px;
  }

  .panel {
    padding: 16px;
    border-radius: 16px;
  }

  .copy-row {
    flex-direction: column;
  }

  .hero-logo-img {
    width: 88px;
    height: 88px;
  }

  #qrcode-canvas {
    width: 160px;
    height: 160px;
  }

  .node-card-head {
    grid-template-columns: 1fr;
  }

  .node-card-index {
    display: none;
  }
}