/* GrowX member UI — Phase 7 */

:root {
  --gx-green: #7cb518;
  --gx-green-dark: #5a8f0f;
  --gx-green-bright: #a2d900;
  --gx-green-dim: rgba(124, 181, 24, 0.12);
  --gx-green-border: rgba(124, 181, 24, 0.35);
  --gx-green-glow: 0 4px 22px rgba(124, 181, 24, 0.38), 0 0 0 1px rgba(162, 217, 0, 0.15);
  --gx-silver: #c0c0c0;
}

.gx-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink-950);
  background-image:
    radial-gradient(ellipse 80% 50% at 15% 0%, rgba(124, 181, 24, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(124, 181, 24, 0.05), transparent 50%);
}

.gx-topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-700);
}
.gx-topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.gx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
/* Logo asset is wide (icon + wordmark + tagline) — never force square */
.gx-logo-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}
.gx-logo-img--header {
  height: clamp(48px, 7.5vw, 64px);
  width: auto;
  max-width: min(280px, 58vw);
  filter: drop-shadow(0 2px 14px rgba(124, 181, 24, 0.22));
}
.gx-logo-img--hero {
  width: 100%;
  height: auto;
  max-width: min(400px, 100%);
  margin: 0 auto;
  filter:
    drop-shadow(0 12px 36px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 32px rgba(124, 181, 24, 0.12));
}
.gx-logo-img--card {
  width: 100%;
  height: auto;
  max-width: min(320px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.gx-logo-showcase {
  display: block;
  width: 100%;
  max-width: min(380px, 100%);
  margin: 0 auto clamp(16px, 3.5vw, 24px);
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.gx-logo-showcase--brand {
  max-width: min(440px, 100%);
  margin: 0 0 clamp(24px, 4vw, 32px);
}
.gx-logo-showcase img,
.gx-logo-showcase .gx-logo-img {
  width: 100%;
  height: auto;
  max-height: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gx-brand-name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink-50); }
.gx-brand-tag { display: block; font-size: 0.65rem; letter-spacing: 0.14em; color: var(--gx-green); font-weight: 600; }

.gx-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.gx-nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm); text-decoration: none;
  color: var(--ink-300); font-size: 0.9rem; font-weight: 600; transition: background 0.15s, color 0.15s;
}
.gx-nav-link:hover { color: var(--ink-50); background: var(--ink-800); }
.gx-nav-link.active { color: var(--gx-green-bright); background: var(--gx-green-dim); }

.gx-wallet-chip {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  background: var(--ink-850); border: 1px solid var(--ink-700); border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 0.8rem;
}
.gx-wallet-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gx-green); }
.gx-logout { color: var(--ink-400); text-decoration: none; margin-left: 4px; }
.gx-logout:hover { color: var(--red-400); }

.gx-main { flex: 1; max-width: 1200px; width: 100%; margin: 0 auto; padding: clamp(16px, 4vw, 28px) clamp(14px, 3vw, 24px) clamp(40px, 6vw, 56px); }
.gx-footer {
  text-align: center; padding: 16px; font-size: 0.75rem; color: var(--ink-400);
  border-top: 1px solid var(--ink-800);
}

.gx-page-head { margin-bottom: clamp(18px, 4vw, 28px); }
.gx-page-head h1 { font-family: var(--font-display); font-size: clamp(1.35rem, 4vw, 1.85rem); line-height: 1.2; margin: 0 0 8px; }
.gx-page-head p { margin: 0; color: var(--ink-300); font-size: clamp(0.85rem, 2.5vw, 0.95rem); line-height: 1.5; max-width: 52ch; }

.gx-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2.5vw, 14px);
}
@media (min-width: 640px) {
  .gx-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .gx-stat-grid--overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gx-stat-grid--bonuses { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .gx-stat-grid--bonuses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.gx-stat {
  background: var(--ink-850);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-md);
  padding: clamp(12px, 3vw, 16px);
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  box-shadow: var(--shadow-card);
}
.gx-stat-label { font-size: 0.72rem; color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.35; }
.gx-stat-value { font-family: var(--font-display); font-size: clamp(1.05rem, 3.2vw, 1.4rem); font-weight: 700; line-height: 1.2; word-break: break-word; }
.gx-stat-value.mono { font-family: var(--font-mono); font-size: clamp(0.9rem, 2.6vw, 1.1rem); font-weight: 600; }
.gx-stat-hint { font-size: 0.72rem; color: var(--ink-400); line-height: 1.45; margin-top: auto; padding-top: 6px; }
.gx-stat-hint a { color: var(--gx-green-bright); text-decoration: none; }
.gx-stat-hint a:hover { text-decoration: underline; }
.gx-stat--green { border-color: var(--gx-green-border); background: linear-gradient(145deg, var(--ink-850) 0%, rgba(124, 181, 24, 0.06) 100%); }
.gx-stat--green .gx-stat-value { color: var(--gx-green-bright); }

/* Slot cards */
.gx-slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gx-slot-card {
  background: var(--ink-850); border: 1px solid var(--ink-700); border-radius: var(--radius-md);
  padding: 14px; text-align: center; transition: border-color 0.15s, transform 0.15s;
}
.gx-slot-card.active { border-color: var(--gx-green); background: var(--gx-green-dim); }
.gx-slot-card.next { border-color: var(--gx-green); box-shadow: var(--gx-green-glow); }
.gx-slot-card.locked { opacity: 0.55; }
.gx-slot-num { font-size: 0.7rem; color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.08em; }
.gx-slot-price { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 600; margin: 8px 0; }
.gx-slot-status { font-size: 0.8rem; margin-top: 8px; }

/* Matrix tree — 2×4 pyramid (YOU + L1–L4 = 30 spots) */
.gx-matrix-wrap {
  background: var(--ink-850);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 3vw, 22px);
}
.gx-matrix-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.gx-matrix-slot-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-matrix-tab {
  padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--ink-600);
  background: transparent; color: var(--ink-300); cursor: pointer; font-size: 0.8rem; font-weight: 600;
}
.gx-matrix-tab.active { border-color: var(--gx-green); color: var(--gx-green-bright); background: var(--gx-green-dim); }
.gx-matrix-tab:disabled { opacity: 0.35; cursor: not-allowed; }

.gx-matrix-fill-meta { margin: 12px 0 8px; }
.gx-matrix-tree {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding-top: 8px;
}
.gx-matrix-root {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.gx-matrix-level { margin-bottom: 16px; }
.gx-matrix-level-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
  font-size: 0.8rem; color: var(--ink-300); gap: 10px; flex-wrap: wrap;
}
.gx-matrix-level-head strong { color: var(--gx-green-bright); }
.gx-matrix-row-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.gx-matrix-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  min-width: min-content;
  margin: 0 auto;
}
.gx-matrix-cell {
  flex: 0 0 auto;
  width: 68px; min-height: 52px; border-radius: var(--radius-sm);
  border: 1px dashed var(--ink-600); background: var(--ink-900);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.65rem; padding: 4px; text-align: center;
}
.gx-matrix-cell--root {
  width: 88px;
  min-height: 58px;
  border-style: solid;
  border-color: var(--gx-green);
  box-shadow: 0 0 0 1px rgba(45, 212, 168, 0.25);
}
.gx-matrix-cell.filled {
  border-style: solid; border-color: var(--gx-green-border); background: var(--gx-green-dim);
}
.gx-matrix-cell .cell-addr { font-family: var(--font-mono); color: var(--ink-100); font-size: 0.6rem; word-break: break-all; }
.gx-matrix-cell .cell-you { color: var(--gx-green-bright); font-weight: 700; font-size: 0.55rem; margin-top: 2px; }

.gx-matrix-level[data-level="3"] .gx-matrix-cell,
.gx-matrix-level[data-level="4"] .gx-matrix-cell {
  width: 52px;
  min-height: 44px;
}
.gx-matrix-level[data-level="3"] .cell-addr,
.gx-matrix-level[data-level="4"] .cell-addr { font-size: 0.52rem; }

.gx-matrix-progress {
  height: 6px; background: var(--ink-700); border-radius: 3px; overflow: hidden; margin-top: 8px;
}
.gx-matrix-progress-bar { height: 100%; background: linear-gradient(90deg, var(--gx-green), var(--gx-green-bright)); transition: width 0.3s; }

/* Invite page */
.gx-invite-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  background: var(--ink-950);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(124, 181, 24, 0.1), transparent 55%);
}
.gx-invite-card {
  max-width: min(520px, 100%);
  width: 100%;
  text-align: center;
  background: var(--ink-850);
  border: 1px solid var(--gx-green-border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 40px) clamp(18px, 4vw, 32px);
  box-shadow: var(--shadow-pop);
}
.gx-invite-sponsor {
  font-size: 0.85rem;
  color: var(--gx-green);
  margin: 0 0 10px;
}
.gx-invite-sponsor strong { color: var(--gx-green-bright); }
.gx-invite-tagline {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.gx-invite-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.gx-invite-footer {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--ink-400);
}
.gx-invite-footer a {
  color: var(--gx-green-bright);
  font-weight: 600;
  text-decoration: none;
}
.gx-invite-footer a:hover { text-decoration: underline; }
.gx-invite-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4.5vw, 1.85rem);
  margin: 0 0 8px;
  line-height: 1.2;
}
.gx-invite-highlight { color: var(--gx-green-bright); }
.gx-invite-price-box {
  margin: clamp(18px, 4vw, 26px) 0;
  padding: clamp(16px, 4vw, 22px);
  border-radius: var(--radius-md);
  background: var(--gx-green-dim);
  border: 1px solid var(--gx-green-border);
}
.gx-invite-price {
  font-size: clamp(2rem, 7vw, 2.65rem);
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--gx-green-bright);
  line-height: 1.1;
}
.gx-invite-ref {
  font-family: var(--font-mono);
  color: var(--gx-silver);
  font-size: clamp(0.82rem, 2.5vw, 0.95rem);
  margin-top: 12px;
  word-break: break-word;
}

.gx-qr-wrap {
  margin: 16px auto;
  padding: clamp(10px, 2.5vw, 14px);
  background: #fff;
  border-radius: var(--radius-md);
  display: inline-block;
}
.gx-qr-wrap img {
  display: block;
  width: clamp(130px, 36vw, 180px);
  height: clamp(130px, 36vw, 180px);
}

/* (logo styles moved to top — wide banner asset) */

/* ---------------------------------------------------------------- */
/* Auth / registration (index.php)                                   */
/* ---------------------------------------------------------------- */

.gx-auth-body {
  min-height: 100vh;
  background: var(--ink-950);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(124, 181, 24, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(124, 181, 24, 0.06), transparent 50%);
}

.gx-auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
}

.gx-auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 56px) clamp(28px, 4vw, 48px);
  border-right: 1px solid var(--ink-800);
  background: linear-gradient(160deg, rgba(124, 181, 24, 0.06) 0%, transparent 45%);
}

.gx-auth-brand-inner { max-width: min(400px, 100%); }
.gx-auth-brand-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink-50);
  line-height: 1.15;
}
.gx-auth-brand-tag {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gx-green);
  font-weight: 700;
  margin: 0 0 28px;
}
.gx-auth-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gx-auth-features li {
  position: relative;
  padding-left: 22px;
  font-size: 0.92rem;
  color: var(--ink-300);
  line-height: 1.45;
}
.gx-auth-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gx-green);
  box-shadow: 0 0 10px rgba(124, 181, 24, 0.5);
}

.gx-auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 3vw, 28px);
}

.gx-auth-card {
  width: 100%;
  max-width: min(440px, 100%);
  background: var(--ink-850);
  border: 1px solid var(--gx-green-border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 32px) clamp(18px, 3.5vw, 28px) clamp(20px, 3vw, 26px);
  box-shadow: var(--shadow-pop);
}

.gx-auth-card-head {
  text-align: center;
  margin-bottom: clamp(16px, 3vw, 22px);
}
.gx-auth-card-head .gx-logo-showcase {
  max-width: min(300px, 92vw);
}
@media (min-width: 901px) {
  .gx-auth-card-head .gx-logo-showcase { display: none; }
}
.gx-auth-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink-50);
}
.gx-auth-tagline {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gx-green);
  font-weight: 600;
}

.gx-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--ink-900);
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-700);
}
.gx-auth-tab {
  padding: 9px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-400);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.gx-auth-tab:hover { color: var(--ink-100); }
.gx-auth-tab.active {
  background: var(--gx-green-dim);
  color: var(--gx-green-bright);
  box-shadow: inset 0 0 0 1px var(--gx-green-border);
}

.gx-auth-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.gx-auth-step {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  color: var(--ink-500, var(--ink-400));
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
}
.gx-auth-step.active {
  color: var(--gx-green-bright);
  border-color: var(--gx-green-border);
  background: var(--gx-green-dim);
}
.gx-auth-step.done {
  color: var(--ink-300);
  border-color: var(--ink-600);
}

.gx-auth-panel { min-height: 140px; }
.gx-auth-step-panel { animation: gxFadeIn 0.2s ease; }
@keyframes gxFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.gx-auth-lead {
  font-size: 0.88rem;
  color: var(--ink-300);
  margin: 0 0 16px;
  line-height: 1.5;
}
.gx-auth-lead strong { color: var(--ink-100); }
.gx-auth-hint {
  font-size: 0.75rem;
  color: var(--ink-400);
  margin: 14px 0 0;
  line-height: 1.45;
  text-align: center;
}
.gx-auth-wallets {
  text-align: center;
  font-size: 0.72rem;
  color: var(--ink-400);
  margin: 18px 0 0;
  letter-spacing: 0.02em;
}

.gx-referral-pill {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
  background: var(--gx-green-dim);
  border: 1px solid var(--gx-green-border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--ink-200, var(--ink-100));
}
.gx-referral-pill code { color: var(--gx-green-bright); font-size: 0.85rem; }
.gx-referral-change {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--ink-400);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.gx-referral-change:hover { color: var(--gx-green-bright); }

.gx-treasury-box {
  background: var(--ink-900);
  border: 1px dashed var(--ink-600);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.8rem;
}
.gx-treasury-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-400);
  margin-bottom: 6px;
}
.gx-treasury-box code {
  display: block;
  word-break: break-all;
  font-size: 0.72rem;
  color: var(--ink-100);
  line-height: 1.4;
}

.gx-auth-working { text-align: center; padding: 20px 0; }

.field label .req { color: var(--red-400); }

/* GrowX logo-green CTAs (auth + invite + landing) */
.gx-auth-card .btn-primary,
.gx-invite-card .btn-primary,
.gx-landing-page .btn-primary {
  background: linear-gradient(135deg, var(--gx-green) 0%, var(--gx-green-bright) 100%);
  color: #0a0c10;
  border-color: var(--gx-green-dark);
  box-shadow: var(--gx-green-glow);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.gx-auth-card .btn-primary:hover,
.gx-invite-card .btn-primary:hover,
.gx-landing-page .btn-primary:hover {
  background: linear-gradient(135deg, var(--gx-green-bright) 0%, var(--gx-green) 100%);
  filter: brightness(1.05);
  box-shadow: 0 6px 28px rgba(124, 181, 24, 0.48), 0 0 0 1px rgba(162, 217, 0, 0.25);
}
.gx-auth-card .btn-primary:active,
.gx-invite-card .btn-primary:active,
.gx-landing-page .btn-primary:active {
  background: linear-gradient(135deg, var(--gx-green-dark) 0%, var(--gx-green) 100%);
}

.gx-auth-card .btn-success {
  background: linear-gradient(135deg, var(--gx-green-dark) 0%, var(--gx-green) 55%, var(--gx-green-bright) 100%);
  color: #0a0c10;
  border-color: var(--gx-green-dark);
  box-shadow: var(--gx-green-glow);
}
.gx-auth-card .btn-success:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 28px rgba(124, 181, 24, 0.48);
}

.gx-auth-card .input:focus,
.gx-auth-card input:focus {
  border-color: var(--gx-green);
  box-shadow: 0 0 0 3px rgba(124, 181, 24, 0.22);
}

@media (max-width: 900px) {
  .gx-auth-layout { grid-template-columns: 1fr; }
  .gx-auth-brand {
    display: flex;
    padding: clamp(20px, 5vw, 32px) clamp(16px, 4vw, 24px) 0;
    border-right: none;
    border-bottom: none;
    background: transparent;
    justify-content: center;
  }
  .gx-auth-brand-inner {
    max-width: min(360px, 100%);
    text-align: center;
  }
  .gx-auth-brand-title,
  .gx-auth-brand-tag { display: none; }
  .gx-auth-features { display: none; }
  .gx-auth-card-head { display: none; }
  .gx-auth-main {
    padding: clamp(12px, 3vw, 20px) clamp(14px, 3.5vw, 24px) clamp(28px, 5vw, 40px);
    align-items: flex-start;
    min-height: auto;
  }
  .gx-auth-card { margin: 0 auto; }
  .gx-invite-card { margin: 0 auto; }
}

@media (max-width: 640px) {
  .gx-auth-card { padding: 18px 14px 16px; }
  .gx-auth-tabs { margin-bottom: 14px; }
  .gx-auth-tab { font-size: 0.8rem; padding: 8px 10px; }
  .gx-matrix-cell { width: 54px; min-height: 44px; }
  .gx-matrix-level[data-level="3"] .gx-matrix-cell,
  .gx-matrix-level[data-level="4"] .gx-matrix-cell { width: 44px; min-height: 40px; }
  .gx-matrix-cell--root { width: 72px; min-height: 50px; }
}

/* ---------------------------------------------------------------- */
/* Member dashboard & front (mobile-first polish)                    */
/* ---------------------------------------------------------------- */

.gx-nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-sm);
  background: var(--ink-850);
  color: var(--ink-100);
  font-size: 1.15rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.gx-nav-toggle:hover {
  border-color: var(--gx-green-border);
  background: var(--gx-green-dim);
}

.gx-dash-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 22px);
}
.gx-dash-section {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.5vw, 14px);
}
.gx-section-heading {
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 2vw, 0.85rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-400);
  margin: 0;
}
.gx-dash-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 3vw, 20px);
  align-items: stretch;
}
@media (min-width: 900px) {
  .gx-dash-row--2 { grid-template-columns: 1fr 1fr; }
}
.gx-dash-row--2 > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.gx-bonus-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.gx-bonus-amount {
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 3.5vw, 1.55rem);
  font-weight: 700;
  color: var(--gx-green-bright);
  margin: 0 0 14px;
  line-height: 1.2;
}
.gx-bonus-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
@media (min-width: 640px) {
  .gx-bonus-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .gx-bonus-chips { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.gx-bonus-chip {
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.78rem;
  color: var(--ink-400);
  line-height: 1.35;
}
.gx-bonus-chip strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-50);
}
.gx-subheading {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-300);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gx-mini-panel {
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.gx-mini-panel h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-200);
}
.gx-mini-panel p { margin: 0; line-height: 1.55; }
.gx-field-note {
  font-size: 0.78rem;
  color: var(--ink-400);
  margin: 8px 0 0;
  line-height: 1.45;
}

.gx-withdraw-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
}
.gx-withdraw-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: end;
}
@media (min-width: 560px) {
  .gx-withdraw-top {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
    gap: 14px 16px;
  }
}
.gx-withdraw-form label,
.gx-withdraw-form .gx-field-spacer {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-300);
  margin: 0 0 8px;
  line-height: 1.2;
  min-height: 1.2em;
}
.gx-withdraw-form .gx-field-spacer {
  visibility: hidden;
  user-select: none;
}
.gx-withdraw-form .gx-field {
  margin: 0;
  min-width: 0;
}
.gx-withdraw-form .gx-field--wallet {
  width: 100%;
}
.gx-withdraw-form .gx-field--wallet input {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(0.72rem, 2vw, 0.84rem) !important;
  letter-spacing: -0.01em;
}
.gx-withdraw-submit {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}
.gx-withdraw-submit .btn {
  width: 100%;
  min-height: 44px;
  margin: 0;
}
.gx-field-locked,
.gx-withdraw-form input.gx-field-locked:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-200);
  border-color: var(--ink-700);
}
.gx-withdraw-feedback {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  min-height: 0;
}
.gx-withdraw-feedback .msg {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  line-height: 1.45;
}
.gx-withdraw-feedback .msg[hidden] {
  display: none !important;
}
.gx-withdraw-feedback .msg-muted:not(:empty) {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ink-700);
}
.gx-withdraw-feedback .msg-error:not(:empty) {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.gx-withdraw-feedback .msg-success:not(:empty) {
  background: rgba(124, 181, 24, 0.08);
  border: 1px solid var(--gx-green-border);
}
.gx-withdraw-history {
  margin-top: 8px;
}
.gx-withdraw-history .empty {
  margin-top: 14px;
  padding: 14px 16px;
  text-align: left;
}
.gx-card-foot {
  font-size: 0.78rem;
  color: var(--ink-400);
  margin: 12px 0 0;
  line-height: 1.45;
}

.gx-income-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  .gx-income-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .gx-income-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.gx-income-strip-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--ink-850);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.gx-income-strip-item:hover {
  border-color: var(--gx-green-border);
  background: rgba(124, 181, 24, 0.06);
}
.gx-income-strip-item--primary {
  border-color: var(--gx-green-border);
  background: linear-gradient(145deg, var(--ink-850) 0%, rgba(124, 181, 24, 0.08) 100%);
}
.gx-income-strip-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-400);
}
.gx-income-strip-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-50);
}
.gx-income-strip-item--primary .gx-income-strip-value {
  color: var(--gx-green-bright);
}

.gx-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gx-green-bright);
}
.gx-live-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gx-green);
  box-shadow: 0 0 8px var(--gx-green);
  animation: gxPulse 2s ease infinite;
}
@keyframes gxPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.gx-live-pill--warn {
  color: #f59e0b;
}
.gx-live-pill--warn::before {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  animation: none;
}

/* Cards inside member app */
.gx-app .card {
  background: var(--ink-850);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 3.5vw, 24px);
  margin-bottom: 0;
  box-shadow: var(--shadow-card);
}
.gx-app .card-title {
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  font-weight: 700;
  margin: 0 0 6px;
  padding-bottom: 0;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.gx-app .card-title .gx-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: var(--gx-green-dim);
  border: 1px solid var(--gx-green-border);
  flex-shrink: 0;
  color: var(--gx-green-bright);
}
.gx-app .card-title .gx-card-icon-svg {
  width: 16px;
  height: 16px;
  display: block;
}
.gx-app .card-sub {
  font-size: clamp(0.8rem, 2.2vw, 0.88rem);
  line-height: 1.55;
  margin: 0 0 clamp(14px, 3vw, 20px);
  color: var(--ink-300);
}
.gx-app .card-sub strong { color: var(--ink-100); }

.gx-app .btn-primary {
  background: linear-gradient(135deg, var(--gx-green) 0%, var(--gx-green-bright) 100%);
  color: #0a0c10;
  border-color: var(--gx-green-dark);
  box-shadow: var(--gx-green-glow);
  font-weight: 700;
  min-height: 44px;
  padding: 11px 20px;
}
.gx-app .btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 24px rgba(124, 181, 24, 0.42);
}
.gx-app .btn-ghost {
  min-height: 44px;
  border-color: var(--ink-600);
}
.gx-app .btn-sm { min-height: 36px; padding: 8px 14px; }

.gx-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.gx-btn-row .btn { flex: 1 1 auto; }
@media (max-width: 480px) {
  .gx-btn-row .btn { width: 100%; }
}

.gx-app .input,
.gx-app input[type="text"],
.gx-app input[type="number"],
.gx-app select {
  min-height: 44px;
  border-color: var(--ink-600);
  background: var(--ink-900);
}
.gx-app .input:focus,
.gx-app input:focus,
.gx-app select:focus {
  border-color: var(--gx-green);
  box-shadow: 0 0 0 3px rgba(124, 181, 24, 0.18);
}

.gx-copy-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 520px) {
  .gx-copy-row { flex-direction: row; align-items: stretch; }
}
.gx-copy-row input {
  flex: 1;
  min-width: 0;
  font-size: clamp(0.72rem, 2vw, 0.82rem) !important;
}
.gx-app .copy-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gx-green-border);
  background: var(--gx-green-dim);
  color: var(--gx-green-bright);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.gx-app .copy-btn:hover {
  background: rgba(124, 181, 24, 0.22);
  color: var(--ink-50);
}

.gx-app .divider,
.gx-app hr.divider {
  border: none;
  border-top: 1px solid var(--ink-700);
  margin: clamp(16px, 3vw, 22px) 0;
}

.gx-app .table-wrap {
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--ink-900);
}
.gx-app table.t {
  font-size: clamp(0.78rem, 2.2vw, 0.85rem);
  min-width: 480px;
}
#royalty-history-table,
#booster-history-table,
#auto-payout-table {
  min-width: 400px;
}
.gx-app table.t thead th {
  background: var(--ink-850);
  border-bottom: 1px solid var(--ink-700);
  padding: 12px 14px;
  white-space: nowrap;
}
.gx-app table.t tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-800);
}
.gx-app table.t tbody tr:hover {
  background: rgba(124, 181, 24, 0.04);
}
.gx-app table.t tr.is-current {
  background: var(--gx-green-dim) !important;
}
.gx-app table.t tr.is-current td:first-child {
  box-shadow: inset 3px 0 0 var(--gx-green);
}

.gx-app .empty {
  padding: clamp(24px, 5vw, 36px) 16px;
  background: var(--ink-900);
  border: 1px dashed var(--ink-600);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.5;
}

.gx-network-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 24px);
  margin-top: clamp(14px, 3vw, 20px);
}
@media (min-width: 640px) {
  .gx-network-grid {
    grid-template-columns: auto 1fr;
    align-items: start;
  }
}
.gx-network-meta {
  font-size: 0.85rem;
  color: var(--ink-300);
  line-height: 1.55;
}
.gx-network-meta p { margin: 0 0 10px; }
.gx-network-meta code {
  color: var(--gx-green-bright);
  font-size: 0.88rem;
}
.gx-network-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 0.85rem;
  color: var(--ink-300);
  margin-bottom: 14px;
}
.gx-network-stats strong { color: var(--ink-50); }

.gx-app .msg {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.45;
}
.gx-app .msg:empty {
  display: none;
  padding: 0;
  border: none;
}
.gx-app .msg-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.gx-app .msg-success {
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.25);
}
.gx-app .msg-muted {
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
}

@media (max-width: 768px) {
  .gx-topbar-inner {
    padding: 10px 14px;
    gap: 10px;
    align-items: center;
  }
  .gx-logo-img--header {
    height: clamp(38px, 10vw, 48px);
    max-width: min(200px, 46vw);
  }
  .gx-nav-toggle { display: inline-flex; }
  .gx-nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--ink-800);
    margin-top: 4px;
  }
  .gx-nav.is-open { display: flex; }
  .gx-nav-link {
    width: 100%;
    padding: 12px 14px;
    text-align: left;
    border-radius: var(--radius-sm);
  }
  .gx-wallet-chip {
    order: 3;
    font-size: 0.72rem;
    padding: 6px 10px;
  }
  .gx-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .gx-stat-grid,
  .gx-stat-grid--overview,
  .gx-stat-grid--bonuses { grid-template-columns: 1fr; }
  .gx-stat--green { order: -1; }
  .gx-bonus-chips { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- */
/* Landing page                                                      */
/* ---------------------------------------------------------------- */

.gx-landing-page {
  min-height: 100vh;
  background: var(--ink-950);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(124, 181, 24, 0.12), transparent 55%);
  color: var(--ink-100);
}
.gx-landing-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 80px) clamp(18px, 4vw, 28px) clamp(32px, 6vw, 56px);
  text-align: center;
}
.gx-landing-hero .gx-logo-showcase {
  max-width: min(420px, 92vw);
  margin-bottom: clamp(20px, 4vw, 32px);
}
.gx-landing-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--ink-50);
}
.gx-landing-sub {
  color: var(--ink-300);
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  line-height: 1.65;
  margin: 0 0 28px;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}
.gx-landing-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.gx-landing-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 28px) clamp(40px, 6vw, 56px);
}
@media (min-width: 640px) {
  .gx-landing-features { grid-template-columns: repeat(3, 1fr); }
}
.gx-landing-feature {
  background: var(--ink-850);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-md);
  padding: clamp(16px, 3vw, 22px);
  text-align: left;
}
.gx-landing-feature h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--gx-green-bright);
  font-family: var(--font-display);
}
.gx-landing-feature p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-300);
  line-height: 1.55;
}
.gx-landing-page .btn-ghost {
  min-height: 44px;
  border-color: var(--gx-green-border);
  color: var(--gx-green-bright);
  background: transparent;
}
.gx-landing-page .btn-ghost:hover {
  background: var(--gx-green-dim);
  border-color: var(--gx-green);
}
