/* 蜥蜴云 · 授权发行站 */
:root {
  --bg: #070b12;
  --bg-panel: #0f1623;
  --bg-card: #141c2b;
  --bg-input: #0a1019;
  --border: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --text-muted: #8b9cb3;
  --accent: #34d399;
  --accent-2: #10b981;
  --accent-glow: rgba(52, 211, 153, 0.22);
  --blue: #60a5fa;
  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.1);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.1);
  --ok: #4ade80;
  --sidebar-w: 260px;
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, rgba(52, 211, 153, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 45% at 100% 20%, rgba(96, 165, 250, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(16, 185, 129, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.12em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* —— 登录 —— */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
}

.login-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 920px;
  width: 100%;
  gap: 0;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.login-hero {
  padding: 48px 40px;
  background: linear-gradient(145deg, #0d2818 0%, #0f1623 45%, #0a1628 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-hero .logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: #022c22;
  margin-bottom: 24px;
  box-shadow: 0 12px 40px var(--accent-glow);
}

.login-hero h1 {
  margin: 0 0 12px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.login-hero p {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.login-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #c4d0de;
}

.login-features li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.login-form-panel {
  padding: 48px 40px;
  background: var(--bg-card);
}

.login-form-panel h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.login-form-panel .sub {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 768px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-form-panel { padding: 32px 24px; }
}

/* —— 布局 —— */
.app {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.sidebar-brand {
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand .row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-sm {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #022c22;
  flex-shrink: 0;
}

.sidebar-brand h1 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.sidebar-brand span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 2px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.sidebar-nav a.active {
  background: var(--accent-glow);
  color: var(--accent);
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.main {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.main-inner {
  padding: 24px 32px 56px;
  max-width: 960px;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 22, 35, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.main-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.4);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .main-inner { padding: 20px 16px 40px; }
  .main-header { padding: 14px 16px; }
}

/* —— 组件 —— */
.welcome-banner {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.12), rgba(96, 165, 250, 0.08));
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 24px;
}

.welcome-banner h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.welcome-banner p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.step-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
}

.step-item .num {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.step-item span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.stat-card .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.stat-card .value {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-card.accent .value { color: var(--accent); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-header-text h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
}

.card-header-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-grid .full { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-hover);
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea { resize: vertical; min-height: 76px; }

.field { margin-bottom: 16px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.checkbox-row input {
  width: auto;
  margin-top: 4px;
  accent-color: var(--accent);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.1s, filter 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #022c22;
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-secondary {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  border: 1px solid var(--border-hover);
}

.btn-secondary:hover { background: rgba(148, 163, 184, 0.18); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(251, 113, 133, 0.3);
}

.btn-sm { padding: 7px 12px; font-size: 0.8rem; }

.btn.copied { background: rgba(74, 222, 128, 0.2); color: var(--ok); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.copy-field {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.copy-field input { flex: 1; font-size: 0.84rem; }

.alert {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.88rem;
}

.alert-success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--ok);
}

.alert-error {
  background: var(--danger-bg);
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: var(--danger);
}

.alert-warn {
  background: var(--warn-bg);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--warn);
}

.alert code {
  display: block;
  margin-top: 8px;
  padding: 10px;
  word-break: break-all;
  font-size: 0.95rem;
}

.hint { font-size: 0.82rem; color: var(--text-muted); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 6px;
}

.badge-ok { background: rgba(74, 222, 128, 0.18); color: var(--ok); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

.release-pill {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.release-pill span {
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.api-doc-toggle {
  width: 100%;
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  margin-bottom: 10px;
}

.api-doc-toggle:hover { color: var(--text); border-color: var(--border-hover); }

.api-doc-panel {
  background: #0a1019;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.api-doc-panel pre {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #a8b8cc;
  white-space: pre-wrap;
  word-break: break-all;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.table-toolbar input {
  flex: 1;
  min-width: 180px;
  margin: 0;
}

.filter-group {
  display: flex;
  gap: 6px;
}

.filter-group .btn.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: rgba(52, 211, 153, 0.35);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

table.data-table th {
  text-align: left;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.data-table tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.table-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.time-muted {
  font-size: 0.78rem;
  color: var(--text-muted);
}
