:root {
  --bg-1: #050816;
  --bg-2: #0a1124;
  --bg-3: #091628;
  --panel: rgba(11, 23, 43, 0.72);
  --panel-soft: rgba(14, 32, 58, 0.5);
  --line: rgba(123, 255, 255, 0.18);
  --line-strong: rgba(0, 255, 255, 0.42);
  --text: #ecf6ff;
  --muted: #9cb3c9;
  --primary: #00f5ff;
  --primary-2: #52ffd9;
  --danger: #ff5e8a;
  --warning: #ffc857;
  --success: #32f0a8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --glow: 0 0 0 1px rgba(0, 255, 255, 0.18), 0 0 30px rgba(0, 245, 255, 0.16);
  --radius: 22px;
  --radius-sm: 14px;
  --font-sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Code", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at top left, rgba(0, 245, 255, 0.16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(82, 255, 217, 0.12), transparent 28%),
    linear-gradient(140deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 88%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(3, 9, 19, 0.56);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: var(--bg-1);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 28px rgba(0, 245, 255, 0.35);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-link {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(0, 245, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 245, 255, 0.14);
}

.hero {
  padding: 72px 0 40px;
  display: grid;
  gap: 22px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(0, 245, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(0, 245, 255, 0.14);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.04;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 60ch;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: var(--glow);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-value {
  margin-top: 10px;
  font-size: 1.8rem;
  font-weight: 700;
}

.glass {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(12, 24, 45, 0.78), rgba(7, 17, 32, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow), var(--glow);
}

.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.45), rgba(255, 255, 255, 0.04), rgba(82, 255, 217, 0.26));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 1.1rem;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
}

.stack {
  display: grid;
  gap: 16px;
}

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

.form-row {
  display: grid;
  gap: 10px;
}

.label {
  font-size: 0.92rem;
  color: var(--muted);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(3, 11, 21, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(0, 245, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(0, 245, 255, 0.1);
}

.input::placeholder,
.textarea::placeholder {
  color: #6f87a1;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 16px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.btn:hover {
  transform: translateY(-1px) scale(1.01);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #011419;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 28px rgba(0, 245, 255, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.btn-danger {
  background: rgba(255, 94, 138, 0.15);
  color: #ffb7cb;
  box-shadow: inset 0 0 0 1px rgba(255, 94, 138, 0.24);
}

.btn-success {
  background: rgba(50, 240, 168, 0.14);
  color: #a5ffdd;
  box-shadow: inset 0 0 0 1px rgba(50, 240, 168, 0.24);
}

.notice,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.notice {
  background: rgba(0, 245, 255, 0.1);
  color: var(--primary);
}

.status-pill {
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

.status-pill.success {
  background: rgba(50, 240, 168, 0.12);
  color: #a5ffdd;
}

.status-pill.warning {
  background: rgba(255, 200, 87, 0.12);
  color: #ffe3a0;
}

.status-pill.danger {
  background: rgba(255, 94, 138, 0.14);
  color: #ffb7cb;
}

.result-card {
  display: none;
}

.result-card.show {
  display: block;
}

.code-shell {
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  background: #040a16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 245, 255, 0.06);
}

.json-code {
  margin: 0;
  color: #f6fbff;
  font-size: 0.95rem;
  line-height: 1.7;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
}

.json-key {
  color: #7ae2ff;
}

.json-string {
  color: #b5ff9d;
}

.json-number {
  color: #ffd680;
}

.json-boolean {
  color: #ff9ad5;
}

.json-null {
  color: #b6bace;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: rgba(5, 12, 24, 0.55);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.03);
}

tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.015);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tiny-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.88rem;
}

.sidebar-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 22px;
  padding: 28px 0 40px;
}

.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
}

.sidebar .nav-links {
  flex-direction: column;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border-radius: 16px;
}

.content-stack {
  display: grid;
  gap: 22px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.6rem;
}

.login-shell {
  width: min(480px, calc(100% - 32px));
  margin: 88px auto;
}

.hidden {
  display: none !important;
}

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 12px;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--text);
  background: rgba(9, 18, 34, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  animation: toast-in 0.24s ease;
}

.toast.success {
  box-shadow: 0 18px 50px rgba(50, 240, 168, 0.12);
}

.toast.error {
  box-shadow: 0 18px 50px rgba(255, 94, 138, 0.16);
}

.toast.info {
  box-shadow: 0 18px 50px rgba(0, 245, 255, 0.16);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skeleton {
  position: relative;
  overflow: hidden;
  min-height: 110px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.footer {
  padding: 20px 0 44px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1080px) {
  .hero-grid,
  .sidebar-layout,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 100%);
  }

  .topbar-inner,
  .button-row,
  .nav-links {
    gap: 8px;
  }

  .hero {
    padding-top: 40px;
  }

  .form-grid,
  .metrics,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .glass {
    padding: 20px;
    border-radius: 20px;
  }

  .panel-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .toast-host {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}
