:root {
  --bg: #070912;
  --fg: #e8ecf7;
  --muted: #9aa0b5;
  --primary: #5cf1c4;
  --primary-strong: #29d29a;
  --accent: #7bd2ff;
  --card: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.08);
  --radius: 18px;
  --shadow: 0 10px 60px rgba(0, 0, 0, 0.35);
  --glass-blur: blur(18px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(124, 240, 204, 0.12), transparent 22%),
              radial-gradient(circle at 80% 10%, rgba(122, 197, 255, 0.16), transparent 24%),
              radial-gradient(circle at 40% 70%, rgba(255, 141, 211, 0.08), transparent 26%),
              linear-gradient(135deg, #06070d 0%, #0a0d18 60%, #05060c 100%);
  color: var(--fg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.065'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  z-index: 0;
}

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

header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(7, 9, 18, 0.7);
  backdrop-filter: blur(16px);
}

header nav {
  display: flex;
  gap: 14px;
  align-items: center;
}

.top-nav {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
}

.top-links a,
.top-links button {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.top-links a:hover,
.top-links button:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}
.notif-wrap { position: relative; }
.notif-wrap .notif-panel { position:absolute; right:0; top:38px; background:rgba(18,22,33,0.95); border:1px solid rgba(255,255,255,0.08); border-radius:12px; padding:10px; width:280px; box-shadow:0 8px 24px rgba(0,0,0,0.3); z-index:20; }
.notif-wrap ul { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:8px; }
.notif-wrap li { border-bottom:1px solid rgba(255,255,255,0.05); padding-bottom:6px; }
.notif-wrap li:last-child { border-bottom:none; }
.notif-dot { display:inline-block; width:8px; height:8px; background:#ff6b6b; border-radius:50%; margin-left:4px; vertical-align:middle; }

.pill-link,
.top-links button {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
}
.pill-link {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.2;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.pill-link:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

.shell {
  width: min(1480px, 92vw);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 14px rgba(92, 241, 196, 0.75);
}

.brand-name {
  letter-spacing: 0.02em;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 54px 0 36px;
}

.hero-copy h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 12px 0 14px;
}

.hero-copy h1 strong {
  color: var(--primary);
}

.hero .lede {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 22px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #02130c;
  box-shadow: 0 8px 30px rgba(92, 241, 196, 0.25);
}
.btn.brand-alipay {
  background: linear-gradient(120deg, #0e9fff, #0066ff);
  color: #fff;
  border: none;
  box-shadow: 0 8px 30px rgba(0, 102, 255, 0.25);
}
.btn.brand-wechat {
  background: linear-gradient(120deg, #34d058, #00c853);
  color: #fff;
  border: none;
  box-shadow: 0 8px 30px rgba(0, 200, 83, 0.25);
}
.btn.brand-balance {
  background: linear-gradient(120deg, var(--primary), var(--primary-strong));
  color: #02130c;
  border: none;
  box-shadow: 0 8px 30px rgba(92, 241, 196, 0.25);
}

.btn.ghost {
  border-color: var(--stroke);
  color: var(--fg);
  background: rgba(255, 255, 255, 0.02);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pills span,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13px;
  border: 1px solid var(--stroke);
}

.pill.success {
  background: rgba(92, 241, 196, 0.1);
  color: var(--primary);
  border-color: rgba(92, 241, 196, 0.4);
}

.hero-panel .card {
  padding: 22px;
}

.glass {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
}

.gradient {
  position: relative;
  overflow: hidden;
}

.gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(92, 241, 196, 0.18), rgba(123, 210, 255, 0.16));
  filter: blur(40px);
  opacity: 0.7;
}

.gradient > * {
  position: relative;
}

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

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

.stat {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.stat h2 {
  margin: 6px 0;
}

.micro {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.trend {
  color: var(--muted);
  margin: 0;
}

.trend.up {
  color: var(--primary);
}

.bar {
  display: flex;
  gap: 4px;
  height: 8px;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  opacity: 0.8;
}

.redeem-flow {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.flow-step {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--stroke);
  font-size: 13px;
  color: var(--muted);
}

.flow-step.active {
  color: var(--primary);
  border-color: rgba(92, 241, 196, 0.5);
  background: rgba(92, 241, 196, 0.08);
}

.section {
  padding: 40px 0;
}

.section h2 {
  margin: 6px 0 12px;
  font-size: clamp(24px, 3vw, 32px);
}

.section-head {
  margin-bottom: 20px;
}

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

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  padding: 18px;
}

.card h3,
.card h4 {
  margin-top: 0;
  margin-bottom: 8px;
}

.card ul,
.card ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.code-card {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

pre {
  margin: 0;
  overflow: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

code {
  display: block;
  padding: 12px;
  color: #c8f4ff;
  font-family: "SFMono-Regular", "JetBrains Mono", "Fira Code", monospace;
  font-size: 14px;
}

.cta {
  padding: 10px 0 50px;
}

.cta .card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.footer {
  padding: 20px 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--stroke);
  margin-top: 20px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.7);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 20;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  width: min(480px, 94vw);
  padding: 20px;
  position: relative;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  color: var(--fg);
  border-radius: 12px;
  width: 34px;
  height: 34px;
  font-size: 18px;
  cursor: pointer;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
}

.form input {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font-size: 15px;
}

.form input:focus {
  outline: 1px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(92, 241, 196, 0.12);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.region-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pie-svg {
  width: 200px;
  height: 200px;
  transform: rotate(-90deg);
  flex-shrink: 0;
}

.pie-track {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 4;
}

.pie-seg {
  fill: none;
  stroke-width: 4;
}

.region-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.legend-row .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 6px;
  border-bottom: 1px solid var(--stroke);
}
.table th {
  text-align: left;
  color: var(--muted);
  font-size: 13px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

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

.filter-group label {
  font-size: 13px;
  color: var(--muted);
}

.filter-group input,
.filter-group select {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  color: var(--fg);
  width: 100%;
}

.filter-group select,
.filter-group input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 2l5 4 5-4' stroke='%23BFC5D8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
  padding-right: 28px;
}

.filter-group input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
}

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.date-select {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.region-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 50px;
  gap: 8px;
  align-items: center;
}

.bar-label {
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  height: 10px;
  position: relative;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: 8px;
}

.bar-value {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.chart-card {
  padding: 6px;
}
.chart-card canvas {
  max-height: 260px;
  width: 100%;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
}

.inline-form {
  display: inline;
  margin: 0;
}
.inline-form .btn {
  margin-left: 6px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
}

.metrics h2 {
  margin: 8px 0 6px;
}

.highlights .section-head {
  margin-bottom: 10px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.highlight {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  position: relative;
}

.highlight h4 {
  margin: 6px 0;
}

.highlight::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(92, 241, 196, 0.16);
  pointer-events: none;
}

.console-area {
  position: relative;
}

.console-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
}

.console-sidebar {
  padding: 16px;
  height: 100%;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  color: var(--fg);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.nav-item.active {
  border-color: rgba(92, 241, 196, 0.5);
  background: rgba(92, 241, 196, 0.08);
}

.console-main {
  position: relative;
  padding: 16px;
  min-height: 320px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.console-main > * + * {
  margin-top: 0; /* gap already applied */ 
}
.section > .panel-card + .panel-card {
  margin-top: 16px;
}

.locked-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(7, 9, 18, 0.9), rgba(7, 9, 18, 0.82));
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  z-index: 2;
}

.console-main.unlocked .locked-mask {
  display: none;
}

.console-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  position: relative;
  z-index: 1;
}

.panel-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.panel-card.wide {
  grid-column: span 2;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: 14px;
}

.admin-nav a {
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.admin-nav a.active {
  color: var(--fg);
  border-color: rgba(92, 241, 196, 0.4);
  background: rgba(92, 241, 196, 0.08);
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.admin-grid {
  display: grid;
  gap: 16px;
}

.admin-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.span-2 {
  grid-column: span 2;
}

.admin-heading {
  margin-bottom: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-bar .filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.filter-bar select,
.filter-bar input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--fg);
}

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

  header {
    position: static;
  }

  header nav {
    display: none;
  }

  .cta .card {
    flex-direction: column;
    align-items: flex-start;
  }

  .console-grid {
    grid-template-columns: 1fr;
  }

  .panel-card.wide {
    grid-column: span 1;
  }
}
