@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #060708;
  --surface: #0b0d10;
  --surface-elevated: #101318;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #f5f7fa;
  --text-sec: #949ba4;
  --text-muted: #646b75;
  --gold: #e5c169;
  --gold-soft: rgba(229, 193, 105, 0.12);
  --mint: #2dd4bf;
  --mint-soft: rgba(45, 212, 191, 0.11);
  --danger: #f87171;
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.56;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Top architectural light beam (Linear / Revolut Ultra mood) */
body::before {
  content: "";
  position: fixed;
  top: -180px;
  left: 50%;
  width: min(1100px, 120vw);
  height: 460px;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 65% 55% at 50% 35%, rgba(229, 193, 105, 0.09), transparent 72%),
    radial-gradient(ellipse 45% 45% at 50% 20%, rgba(255, 255, 255, 0.05), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 7, 8, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  letter-spacing: 0.14em;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(229, 193, 105, 0.35);
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-sec);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Hero Split */
.hero {
  padding: 72px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 52px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.35rem, 4.7vw, 3.85rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 0 0 20px;
}

.hero h1 span {
  color: var(--text-sec);
  font-weight: 600;
}

.lead {
  color: var(--text-sec);
  font-size: 1.08rem;
  max-width: 44ch;
  margin: 0 0 32px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 13px 22px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

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

.btn-gold {
  background: var(--gold);
  color: #090a0c;
}

.btn-gold:hover {
  background: #edd082;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-mint {
  background: var(--mint-soft);
  border-color: rgba(45, 212, 191, 0.4);
  color: var(--mint);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.38);
  color: var(--danger);
}

/* Interactive Brushed-Titanium Metallic Member Card (Apple Card / Revolut Ultra) */
.metal-card-wrap {
  perspective: 1200px;
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.metal-card {
  --rx: 5deg;
  --ry: -9deg;
  --sx: 28%;
  --sy: 22%;
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1.586 / 1;
  border-radius: 20px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(135deg, #171a1f 0%, #0b0d10 52%, #13161b 100%);
  border: 1px solid rgba(229, 193, 105, 0.36);
  box-shadow:
    0 34px 70px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  overflow: hidden;
  user-select: none;
}

.metal-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    340px circle at var(--sx) var(--sy),
    rgba(229, 193, 105, 0.18),
    rgba(255, 255, 255, 0.06) 34%,
    transparent 70%
  );
  mix-blend-mode: screen;
}

.metal-edge-glint {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  background: radial-gradient(
    240px circle at var(--sx) var(--sy),
    rgba(229, 193, 105, 0.35),
    transparent 65%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
}

.metal-top,
.metal-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text);
}

.metal-tier {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
}

.metal-center {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
}

.metal-chip {
  width: 40px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid rgba(229, 193, 105, 0.45);
  background: linear-gradient(135deg, rgba(229, 193, 105, 0.25), rgba(229, 193, 105, 0.05));
}

.metal-mono-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--text-sec);
  text-transform: uppercase;
}

.metal-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--mint);
  letter-spacing: 0.08em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
}

/* Sections */
section {
  padding: 54px 0;
}

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

.section-head h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0 8px;
}

.section-head p {
  color: var(--text-sec);
  margin: 0;
  max-width: 58ch;
  font-size: 0.96rem;
}

.meta-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--text-sec);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Architectural 3-Column Metrics Strip */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.metric-cell {
  padding: 28px;
  border-right: 1px solid var(--border);
}

.metric-cell:last-child {
  border-right: none;
}

.kpi-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.kpi-value {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-top: 10px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.kpi-value.gold {
  color: var(--gold);
}

.kpi-sub {
  font-size: 0.83rem;
  color: var(--text-sec);
  margin-top: 6px;
}

/* Architectural 3-Column Pillars Strip */
.pillars-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.pillar-cell {
  padding: 28px;
  border-right: 1px solid var(--border);
}

.pillar-cell:last-child {
  border-right: none;
}

.pillar-icon {
  width: 22px;
  height: 22px;
  color: var(--gold);
  margin-bottom: 14px;
}

.pillar-cell h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.pillar-cell p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-sec);
}

/* Unified Access Shell (#subscribe) */
.access-shell {
  display: grid;
  grid-template-columns: 0.94fr 1.06fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.access-plan {
  padding: 34px;
  border-right: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(229, 193, 105, 0.05), transparent 55%);
}

.access-form-pane {
  padding: 34px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.price-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.price-head h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill-mint {
  background: var(--mint-soft);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--mint);
}

.price-line {
  margin: 18px 0 6px;
}

.price-amount {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
}

.price-period {
  color: var(--text-sec);
  font-size: 0.94rem;
}

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

.pass-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(6, 7, 8, 0.55);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.pass-option:hover {
  border-color: rgba(229, 193, 105, 0.55);
  transform: translateY(-1px);
}

.pass-option.active {
  border-color: var(--gold);
  background: rgba(229, 193, 105, 0.12);
  box-shadow: 0 0 0 1px rgba(229, 193, 105, 0.28);
}

.pass-option-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mint);
}

.pass-option.active .pass-option-badge {
  color: var(--gold);
}

.pass-option-days {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.pass-option-price {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold);
}

.pass-option-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

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

.payments-paused-card {
  border: 1px solid rgba(229, 193, 105, 0.35);
  background: rgba(229, 193, 105, 0.08);
  border-radius: 14px;
  padding: 18px;
  margin-top: 8px;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(229, 193, 105, 0.42);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: "JetBrains Mono", monospace;
  color: var(--gold);
  font-size: 1.15rem;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-sec);
  font-size: 0.92rem;
  line-height: 1.55;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}

.check-list li {
  padding: 7px 0;
  color: var(--text-sec);
  font-size: 0.92rem;
  display: flex;
  gap: 10px;
}

.check-list li::before {
  content: "—";
  color: var(--gold);
  font-weight: 700;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.84rem;
  color: var(--text-sec);
  margin-bottom: 6px;
  font-weight: 600;
}

.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.96rem;
}

.input:focus {
  outline: none;
  border-color: var(--gold);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.83rem;
  color: var(--text-sec);
  margin-bottom: 16px;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin: 12px 0;
}

.alert-info {
  background: var(--mint-soft);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--text);
}

.alert-warn {
  background: var(--gold-soft);
  border: 1px solid rgba(229, 193, 105, 0.35);
  color: var(--gold);
}

.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

code.hash {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--text-muted);
}

/* QR Download Panel (post-checkout / post-login only) */
.qr-download-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--surface-elevated);
  border: 1px solid rgba(229, 193, 105, 0.3);
  border-radius: 14px;
  padding: 12px;
}

.qr-canvas-wrap {
  background: #ffffff;
  padding: 8px;
  border-radius: 10px;
  border: 1.5px solid var(--gold);
  line-height: 0;
}

.qr-canvas {
  width: 152px;
  height: 152px;
  display: block;
}

.qr-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-sec);
  line-height: 1.3;
}

.qr-caption strong {
  color: var(--gold);
}

.qr-url-hint {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* Banner & Footer */
.rg-banner {
  border-top: 1px solid var(--border);
  padding: 18px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 28px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 42px;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.device-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

/* Commercial 3-Screen App Showcase */
.app-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
  padding-top: 14px;
}

.phone-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.phone-mock {
  position: relative;
  width: 100%;
  max-width: 268px;
  background: #07080a;
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  padding: 10px;
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.65);
  cursor: zoom-in;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.phone-mock:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 193, 105, 0.45);
}

.phone-mock img {
  display: block;
  width: 100%;
  border-radius: 22px;
}

.phone-featured {
  transform: translateY(-14px);
  border-color: rgba(229, 193, 105, 0.48);
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.78),
    0 0 60px rgba(229, 193, 105, 0.12);
}

.phone-featured:hover {
  transform: translateY(-20px);
}

.phone-caption {
  margin-top: 16px;
}

.phone-caption h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.phone-caption p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-sec);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 6, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 20px;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-height: 90vh;
  max-width: 92vw;
  border-radius: 20px;
  border: 1px solid rgba(229, 193, 105, 0.45);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85);
}

@media (max-width: 900px) {
  .hero {
    padding: 44px 0 36px;
  }

  .hero-grid,
  .metrics-strip,
  .pillars-strip,
  .app-showcase,
  .access-shell,
  .qr-download-panel {
    grid-template-columns: 1fr;
  }

  .phone-featured,
  .phone-featured:hover {
    transform: none;
  }

  .metric-cell,
  .pillar-cell,
  .access-plan {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .metric-cell:last-child,
  .pillar-cell:last-child {
    border-bottom: none;
  }
}

/* --- Admin Console (Fintech Luxe) --- */
.admin-shell {
  padding: 40px 24px 72px;
  max-width: 1180px;
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.admin-kpi {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-kpi-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-kpi-val {
  font-size: 1.55rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  color: var(--text);
}

.admin-kpi-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-kpi-hero {
  border-color: rgba(45, 212, 191, 0.35);
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.08), var(--surface-elevated));
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.65);
  animation: livePulse 2s infinite;
  flex-shrink: 0;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(45, 212, 191, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
  }
}

.admin-kpi-sub {
  font-size: 0.78rem;
  color: var(--text-sec);
  overflow-wrap: anywhere;
}

.admin-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 18px;
}

.admin-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-sec);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.tab-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.admin-tab.active .tab-count {
  color: var(--gold);
}

.admin-tab.active {
  background: var(--surface-elevated);
  color: var(--gold);
  border-color: rgba(229, 193, 105, 0.35);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-search {
  flex: 1 1 260px;
  max-width: 380px;
}

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

.filter-pill {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-sec);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.filter-pill.active {
  background: var(--gold-soft);
  border-color: rgba(229, 193, 105, 0.45);
  color: var(--gold);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

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

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.member-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gold-soft);
  border: 1px solid rgba(229, 193, 105, 0.3);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.member-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-active {
  background: var(--mint-soft);
  color: var(--mint);
  border: 1px solid rgba(45, 212, 191, 0.35);
}

.status-trialing,
.status-allowlisted {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(229, 193, 105, 0.35);
}

.status-cancelled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sec);
  border: 1px solid var(--border-strong);
}

.status-suspended {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

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

.btn-xs {
  padding: 5px 10px;
  font-size: 0.76rem;
  border-radius: 8px;
}

.mono-sm {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--text-sec);
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 8, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.admin-modal-backdrop.open {
  display: flex;
}

.admin-modal {
  width: 100%;
  max-width: 460px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75);
}

@media (max-width: 768px) {
  .topbar-inner {
    min-height: 58px;
    gap: 10px;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-links a {
    font-size: 0.82rem;
  }

  .admin-shell {
    padding: 20px 14px 56px;
  }

  .admin-header {
    align-items: stretch;
    gap: 14px;
    margin-bottom: 18px;
  }

  .admin-actions-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .admin-actions-bar .btn {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 0.84rem;
    width: 100%;
  }

  #adm-open-grant {
    grid-column: 1 / -1;
  }

  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .admin-kpi {
    padding: 13px 14px;
  }

  .admin-kpi-hero {
    grid-column: 1 / -1;
  }

  .admin-kpi-val {
    font-size: 1.32rem;
  }

  .admin-tabs {
    display: flex;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 14px;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-tab {
    padding: 8px 13px;
    font-size: 0.83rem;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-search {
    flex: none;
    max-width: none;
    width: 100%;
  }

  .filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    flex-shrink: 0;
  }

  .admin-table-wrap {
    border: none;
    background: transparent;
    overflow-x: visible;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .admin-table tbody tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 14px;
  }

  .admin-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-align: right;
    word-break: break-word;
  }

  .admin-table td:last-child {
    border-bottom: none;
  }

  .admin-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    flex-shrink: 0;
  }

  .admin-table td.td-primary {
    display: block;
    text-align: left;
    padding-top: 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
  }

  .admin-table td.td-primary::before,
  .admin-table td.td-actions::before,
  .admin-table td.td-empty::before {
    display: none;
  }

  .member-info {
    min-width: 0;
  }

  .member-info strong {
    display: block;
    overflow-wrap: anywhere;
  }

  .admin-table td.td-actions {
    display: block;
    text-align: left;
    padding-top: 10px;
    padding-bottom: 2px;
  }

  .admin-table td.td-actions .row-actions {
    width: 100%;
  }

  .admin-table td.td-actions .btn {
    flex: 1 1 auto;
    min-height: 38px;
    font-size: 0.82rem;
  }

  .admin-table td.td-empty {
    display: block;
    text-align: center;
    padding: 18px 8px;
  }

  .admin-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .admin-modal {
    max-width: none;
    border-radius: 22px 22px 0 0;
    padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .admin-modal form > div:last-child {
    flex-direction: column-reverse;
  }

  .admin-modal form > div:last-child .btn {
    width: 100%;
    min-height: 44px;
  }
}
