@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --thub-bg: #070810;
  --thub-bg-2: #0c0f1d;
  --thub-panel: rgba(18, 22, 36, 0.88);
  --thub-panel-2: rgba(25, 30, 48, 0.92);
  --thub-line: rgba(142, 156, 196, 0.22);
  --thub-text: #f4f7fb;
  --thub-muted: #9aa6ba;
  --thub-cyan: #16d9e7;
  --thub-rose: #ff3d81;
  --thub-acid: #b6ff4d;
  --thub-violet: #8b5cf6;
  --thub-amber: #ffbf47;
  --thub-danger: #ff4d6d;
  --thub-radius: 8px;
  color-scheme: dark;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(22, 217, 231, 0.08) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, var(--thub-bg), var(--thub-bg-2) 58%, #06070d);
  color: var(--thub-text);
  font-family: Inter, system-ui, sans-serif;
}

#app {
  min-width: 0;
}

button, input, select, textarea {
  font-family: Inter, system-ui, sans-serif;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--thub-cyan);
  outline-offset: 2px;
}

.thub-shell {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.thub-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 100% 4px;
  opacity: 0.12;
  mix-blend-mode: screen;
}

.thub-topbar {
  height: 64px;
  border-bottom: 1px solid var(--thub-line);
  background: rgba(7, 8, 16, 0.82);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.thub-logo {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--thub-text);
  letter-spacing: 0;
}

.thub-logo span {
  color: var(--thub-cyan);
  text-shadow: 0 0 18px rgba(22, 217, 231, 0.48);
}

.thub-nav-button {
  min-height: 44px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--thub-muted);
  padding: 0 12px;
  border-radius: var(--thub-radius);
  font-weight: 700;
  cursor: pointer;
}

.thub-nav-button[data-active="true"] {
  color: var(--thub-text);
  border-color: rgba(22, 217, 231, 0.36);
  background: linear-gradient(180deg, rgba(22, 217, 231, 0.16), rgba(139, 92, 246, 0.09));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 0 28px rgba(22, 217, 231, 0.12);
}

.thub-main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.portal {
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px 20px 64px;
  position: relative;
  overflow-x: hidden;
}

.portal-top-controls {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: calc(100% - 40px);
}

.portal-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 4px 4px 12px;
  border: 1px solid rgba(142, 156, 196, 0.22);
  border-radius: 999px;
  background: rgba(12, 15, 29, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.portal-language-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(142, 156, 196, 0.22);
  border-radius: 999px;
  background: rgba(12, 15, 29, 0.78);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.portal-language-toggle button {
  min-width: 38px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  color: var(--thub-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.portal-language-toggle button[data-active="true"] {
  color: #061016;
  background: linear-gradient(90deg, var(--thub-cyan), var(--thub-acid));
}

.portal-account span {
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--thub-muted);
  font-size: 12px;
  font-weight: 900;
}

.portal-account button {
  min-height: 30px;
  border: 1px solid rgba(142, 156, 196, 0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  color: var(--thub-text);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.portal-hero {
  min-height: min(680px, calc(100vh - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 24px;
  align-items: center;
}

.portal-title {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(42px, 8vw, 104px);
  line-height: 0.92;
  letter-spacing: 0;
  margin: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

.portal-title .title-line {
  display: block;
  color: var(--thub-text);
}

.portal-title .title-accent {
  display: inline-block;
  color: var(--thub-cyan);
  text-shadow: 0 0 28px rgba(22, 217, 231, 0.44);
}

.portal-subtitle {
  max-width: 720px;
  color: var(--thub-muted);
  font-size: 17px;
  line-height: 1.65;
  margin: 22px 0 0;
  overflow-wrap: break-word;
}

.portal-error {
  color: var(--thub-danger);
  margin: 14px 0 0;
  max-width: 680px;
  overflow-wrap: break-word;
  line-height: 1.5;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.portal-actions.compact {
  margin-top: 24px;
}

.portal-button {
  min-height: 46px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--thub-text);
  background: var(--thub-panel-2);
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 180ms ease, filter 180ms ease, border-color 180ms ease;
}

.portal-button:hover {
  transform: translateY(-2px);
}

.portal-button:active {
  transform: translateY(0);
}

.portal-button.primary {
  color: #061016;
  background: linear-gradient(90deg, var(--thub-cyan), var(--thub-acid));
  box-shadow: 0 14px 42px rgba(22, 217, 231, 0.22);
}

.portal-button.primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 18px 52px rgba(22, 217, 231, 0.34);
}

.portal-button.ghost:hover {
  border-color: rgba(22, 217, 231, 0.4);
}

.portal-button:disabled {
  transform: none;
  filter: saturate(0.7) brightness(0.9);
  opacity: 0.7;
}

.portal-button.ghost {
  color: #dce5f3;
  border-color: rgba(142, 156, 196, 0.22);
  background: rgba(7, 8, 16, 0.42);
  box-shadow: none;
}

.portal-button:disabled {
  cursor: not-allowed;
}

.portal-button.coming-soon {
  border-color: rgba(142, 156, 196, 0.18);
  color: #8e98ab;
  background: rgba(32, 37, 52, 0.76);
  box-shadow: none;
}

.portal-panel {
  border: 1px solid var(--thub-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    var(--thub-panel);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  overflow: hidden;
  min-width: 0;
}

.portal-card {
  border: 1px solid var(--thub-line);
  background: linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025));
  border-radius: var(--thub-radius);
  padding: 16px;
  min-width: 0;
}

.premium-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 16px;
}

.launch-strip {
  padding: 18px;
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.32fr);
  gap: 16px;
  align-items: start;
  border-color: rgba(255, 191, 71, 0.38);
  background:
    linear-gradient(110deg, rgba(255, 191, 71, 0.12), rgba(255, 61, 129, 0.06) 42%, rgba(22, 217, 231, 0.06)),
    var(--thub-panel);
}

.launch-price-card {
  border: 1px solid rgba(255, 191, 71, 0.3);
  border-radius: var(--thub-radius);
  padding: 14px;
  background: rgba(7, 8, 16, 0.44);
  display: grid;
  gap: 8px;
}

.launch-price-card span {
  color: var(--thub-acid);
  font-weight: 900;
  font-size: 22px;
}

.launch-price-card strong {
  color: var(--thub-muted);
  font-size: 13px;
}

.setup-flow {
  position: relative;
  padding: 22px;
  border-color: rgba(22, 217, 231, 0.34);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(22, 217, 231, 0.16), transparent 55%),
    radial-gradient(120% 90% at 100% 0%, rgba(139, 92, 246, 0.14), transparent 60%),
    linear-gradient(125deg, rgba(22, 217, 231, 0.07), rgba(182, 255, 77, 0.04) 42%, rgba(139, 92, 246, 0.05)),
    var(--thub-panel);
  overflow: hidden;
}

.setup-flow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% -10%, rgba(22, 217, 231, 0.18), transparent 70%);
  pointer-events: none;
}

.setup-flow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.setup-flow-head strong {
  min-width: 82px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(182, 255, 77, 0.28);
  border-radius: var(--thub-radius);
  color: var(--thub-acid);
  background: rgba(7, 8, 16, 0.42);
  font-size: 13px;
  font-weight: 950;
}

.setup-progress {
  position: relative;
  height: 8px;
  margin: 18px 0;
  border-radius: 999px;
  background: rgba(142, 156, 196, 0.16);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.setup-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--thub-cyan), var(--thub-acid));
  box-shadow: 0 0 12px rgba(22, 217, 231, 0.6);
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.setup-steps {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.setup-step {
  position: relative;
  min-width: 0;
  min-height: 92px;
  border: 1px solid rgba(142, 156, 196, 0.16);
  border-radius: 14px;
  background: rgba(7, 8, 16, 0.48);
  padding: 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

/* connector line linking the step badges */

.setup-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 37px;
  top: calc(50% + 22px);
  bottom: -12px;
  width: 2px;
  background: linear-gradient(180deg, rgba(142, 156, 196, 0.3), transparent);
}

.setup-step[data-state="done"]:not(:last-child)::after {
  background: linear-gradient(180deg, rgba(182, 255, 77, 0.5), rgba(22, 217, 231, 0.12));
}

.setup-step[data-state="active"] {
  border-color: rgba(22, 217, 231, 0.6);
  background:
    linear-gradient(135deg, rgba(22, 217, 231, 0.15), rgba(139, 92, 246, 0.08)),
    rgba(7, 8, 16, 0.62);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(22, 217, 231, 0.2), 0 0 24px rgba(22, 217, 231, 0.18);
  transform: translateY(-1px);
}

.setup-step[data-state="done"] {
  border-color: rgba(182, 255, 77, 0.32);
  background:
    linear-gradient(135deg, rgba(182, 255, 77, 0.08), rgba(22, 217, 231, 0.05)),
    rgba(7, 8, 16, 0.5);
}

.setup-number {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #061016;
  background: linear-gradient(135deg, rgba(22, 217, 231, 0.22), rgba(139, 92, 246, 0.16));
  border: 1px solid rgba(142, 156, 196, 0.28);
  font-weight: 950;
  font-size: 18px;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background 220ms ease, border-color 220ms ease;
}

.setup-number-icon {
  font-size: 18px;
  line-height: 1;
  filter: saturate(120%);
}

.setup-step[data-state="active"] .setup-number {
  background: linear-gradient(135deg, var(--thub-cyan), var(--thub-violet));
  border-color: rgba(22, 217, 231, 0.6);
  transform: scale(1.06);
  animation: setupPulse 2.4s ease-in-out infinite;
}

@keyframes setupPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 217, 231, 0.34); }
  50% { box-shadow: 0 0 0 7px rgba(22, 217, 231, 0); }
}

.setup-step[data-state="done"] .setup-number {
  background: linear-gradient(135deg, var(--thub-cyan), var(--thub-acid));
  border-color: rgba(182, 255, 77, 0.5);
}

.setup-step[data-state="done"] .setup-number-icon {
  display: none;
}

.setup-step[data-state="done"] .setup-number::before {
  content: "";
  width: 15px;
  height: 9px;
  border-left: 3px solid #061016;
  border-bottom: 3px solid #061016;
  transform: rotate(-45deg) translateY(-1px);
  animation: setupCheck 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes setupCheck {
  0% { transform: rotate(-45deg) translateY(-1px) scale(0); opacity: 0; }
  60% { transform: rotate(-45deg) translateY(-1px) scale(1.25); opacity: 1; }
  100% { transform: rotate(-45deg) translateY(-1px) scale(1); opacity: 1; }
}

.setup-step strong {
  display: block;
  color: var(--thub-text);
  font-weight: 900;
}

.setup-step p {
  color: var(--thub-muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.setup-step small {
  color: var(--thub-acid);
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 900;
}

.setup-step-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setup-action-hint {
  grid-column: 2;
  margin: 0;
  color: var(--thub-muted);
  font-size: 12px;
  font-weight: 800;
}

.setup-step > .portal-button {
  grid-column: 2;
  justify-self: start;
}

.setup-step-actions .portal-button,
.setup-step > .portal-button {
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
}

.setup-done-label {
  grid-column: 2;
  width: max-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(182, 255, 77, 0.28);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--thub-acid);
  background: rgba(182, 255, 77, 0.08);
  font-size: 12px;
  font-weight: 950;
}

.referral-panel {
  margin-top: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.34fr);
  gap: 16px;
  align-items: start;
  border-color: rgba(22, 217, 231, 0.32);
  background:
    linear-gradient(110deg, rgba(22, 217, 231, 0.12), rgba(139, 92, 246, 0.07) 46%, rgba(182, 255, 77, 0.06)),
    var(--thub-panel);
}

.referral-copy {
  min-width: 0;
}

.referral-link-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.referral-link-row.compact {
  display: flex;
}

.referral-link-row code {
  min-height: 46px;
  min-width: 0;
  display: flex;
  align-items: center;
  border: 1px solid rgba(142, 156, 196, 0.18);
  border-radius: var(--thub-radius);
  background: rgba(7, 8, 16, 0.62);
  color: #d8e0ef;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-scorecard {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.referral-scorecard div {
  min-height: 78px;
  border: 1px solid rgba(142, 156, 196, 0.18);
  border-radius: var(--thub-radius);
  background: rgba(7, 8, 16, 0.46);
  padding: 12px;
}

.referral-scorecard span,
.referral-row span {
  color: var(--thub-muted);
  font-size: 12px;
  font-weight: 900;
}

.referral-scorecard strong {
  display: block;
  margin-top: 8px;
  color: var(--thub-acid);
  font-size: 22px;
  font-weight: 900;
}

.referral-reward-track {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.referral-reward-card {
  min-height: 92px;
  border: 1px solid rgba(142, 156, 196, 0.18);
  border-radius: var(--thub-radius);
  background:
    linear-gradient(135deg, rgba(7, 8, 16, 0.78), rgba(22, 217, 231, 0.05)),
    rgba(7, 8, 16, 0.52);
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 5px;
}

.referral-reward-card[data-unlocked="true"] {
  border-color: rgba(182, 255, 77, 0.46);
  background:
    linear-gradient(135deg, rgba(182, 255, 77, 0.14), rgba(22, 217, 231, 0.08)),
    rgba(7, 8, 16, 0.58);
}

.referral-reward-card span,
.referral-reward-card small {
  color: var(--thub-muted);
  font-size: 12px;
  font-weight: 900;
}

.referral-reward-card b {
  color: var(--thub-text);
  font-size: 18px;
}

.referral-reward-card[data-unlocked="true"] small {
  color: var(--thub-acid);
}

.referral-recent {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.referral-row {
  min-height: 40px;
  border: 1px solid rgba(142, 156, 196, 0.14);
  border-radius: var(--thub-radius);
  background: rgba(255,255,255,0.035);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.referral-row b {
  color: var(--thub-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.referral-row b[data-status="qualified"] {
  color: var(--thub-acid);
}

.referral-row b[data-status="suspicious"] {
  color: var(--thub-danger);
}

.catalog-band,
.supporter-band {
  padding: 18px;
  margin-top: 18px;
}

.supporter-band {
  border-color: rgba(255, 191, 71, 0.32);
  background:
    linear-gradient(110deg, rgba(255, 191, 71, 0.1), rgba(255, 61, 129, 0.06) 44%, rgba(22, 217, 231, 0.05)),
    var(--thub-panel);
}

.portal-tier-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-muted {
  color: var(--thub-muted);
  line-height: 1.6;
  margin: 8px 0 0;
}

.portal-muted.small {
  font-size: 12px;
}

.portal-price {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--thub-amber);
  font-variant-numeric: tabular-nums;
}

.portal-price small {
  color: var(--thub-muted);
  font-size: 14px;
  margin-left: 2px;
}

.cta-card h3 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 28px;
  line-height: 1.04;
  margin: 14px 0 0;
}

.cta-card p {
  color: var(--thub-muted);
  line-height: 1.6;
  margin-top: 10px;
}

.cta-main {
  width: 100%;
  margin-top: 18px;
}

.portal-deal {
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--thub-radius);
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(7, 8, 16, 0.42);
}

.portal-deal strong {
  color: var(--thub-text);
  font-size: 16px;
}

.portal-deal span {
  color: var(--thub-acid);
  font-size: 12px;
  font-weight: 700;
}

.portal-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(142, 156, 196, 0.16);
  color: var(--thub-muted);
  font-size: 13px;
  line-height: 1.5;
}

.portal-footer strong {
  color: var(--thub-text);
}

.portal-preview-chat {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.portal-preview-panel {
  margin-top: 18px;
}

.portal-chat-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  color: #c7d0e2;
}

.portal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  margin-bottom: 4px;
  border: 1px solid var(--thub-line);
  border-radius: 999px;
  color: var(--thub-muted);
  font-size: 12px;
  font-weight: 800;
}

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

.catalog-lanes {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.cosmetic-lane {
  min-width: 0;
}

.cosmetic-lane-head {
  min-height: 36px;
  border-bottom: 1px solid rgba(142, 156, 196, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--thub-muted);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.cosmetic-lane-head b {
  color: var(--thub-cyan);
}

.effect-card {
  min-height: 124px;
  border: 1px solid var(--thub-line);
  border-radius: var(--thub-radius);
  background: rgba(12, 15, 29, 0.74);
  padding: 14px;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
  min-width: 0;
  text-align: left;
}

.effect-card:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 217, 231, 0.42);
  background: rgba(18, 23, 42, 0.92);
}

.effect-card:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.effect-card:disabled:hover {
  transform: none;
}

.effect-card[data-owned="true"] {
  border-color: rgba(182, 255, 77, 0.58);
}

.effect-name {
  font-weight: 900;
  font-size: 17px;
  margin-top: 8px;
}

.paint-preview-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.paint-swatch {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
}

.badge-preview {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
}

.admin-badge-preview {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
}

.section-title {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 24px;
  margin: 0;
}

.admin-catalog {
  display: grid;
  gap: 18px;
}

.admin-hero {
  border: 1px solid var(--thub-line);
  border-radius: var(--thub-radius);
  background:
    linear-gradient(115deg, rgba(22, 217, 231, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.026));
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.admin-hero h1 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 0.98;
  margin: 8px 0 0;
  letter-spacing: 0;
  max-width: 780px;
}

.admin-hero p {
  color: var(--thub-muted);
  line-height: 1.6;
  max-width: 700px;
  margin: 12px 0 0;
}

.admin-kicker {
  color: var(--thub-cyan);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.admin-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 8px;
}

.admin-metric {
  min-height: 78px;
  border: 1px solid var(--thub-line);
  border-radius: var(--thub-radius);
  padding: 12px;
  background: rgba(7, 8, 16, 0.52);
}

.admin-metric span {
  display: block;
  color: var(--thub-muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-metric strong {
  display: block;
  font-size: 28px;
  margin-top: 6px;
}

.admin-toolbar {
  min-height: 58px;
  border: 1px solid var(--thub-line);
  border-radius: var(--thub-radius);
  padding: 10px;
  background: rgba(12, 15, 29, 0.82);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-toolbar-spacer {
  flex: 1;
}

.admin-search,
.admin-control,
.admin-field input,
.admin-field select,
.admin-field textarea {
  min-height: 44px;
  border: 1px solid rgba(142, 156, 196, 0.28);
  border-radius: var(--thub-radius);
  background: rgba(7, 8, 16, 0.78);
  color: var(--thub-text);
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.admin-search {
  width: min(100%, 300px);
}

.admin-control {
  min-width: 132px;
}

.admin-button {
  min-height: 44px;
  border-radius: var(--thub-radius);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--thub-text);
  background: rgba(25, 30, 48, 0.94);
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.admin-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(22, 217, 231, 0.42);
}

.admin-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.admin-button.primary {
  color: #061016;
  background: linear-gradient(90deg, var(--thub-cyan), var(--thub-acid));
}

.admin-button.accent {
  color: #0f0911;
  background: linear-gradient(90deg, var(--thub-amber), var(--thub-rose));
}

.admin-button.ghost {
  background: rgba(255,255,255,0.055);
}

.admin-button.danger {
  color: #ffe5eb;
  border-color: rgba(255, 77, 109, 0.42);
  background: rgba(255, 77, 109, 0.12);
}

.admin-button.mini {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.file-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-editor {
  border: 1px solid rgba(22, 217, 231, 0.35);
  border-radius: var(--thub-radius);
  background: rgba(12, 15, 29, 0.9);
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.admin-editor-preview {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-form {
  display: grid;
  gap: 14px;
}

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

.admin-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--thub-muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-field input,
.admin-field select {
  width: 100%;
}

.admin-field textarea {
  width: 100%;
  min-height: 110px;
  padding-block: 10px;
  resize: vertical;
  line-height: 1.5;
}

.admin-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-check {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--thub-text);
  font-weight: 800;
}

.admin-check input {
  width: 18px;
  height: 18px;
}

.admin-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.catalog-section {
  display: grid;
  gap: 12px;
}

.catalog-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.catalog-section h2 {
  font-family: "Space Grotesk", Inter, sans-serif;
  margin: 4px 0 0;
  font-size: 24px;
  letter-spacing: 0;
}

.admin-count {
  min-width: 44px;
  min-height: 32px;
  border-radius: var(--thub-radius);
  border: 1px solid var(--thub-line);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--thub-cyan);
  background: rgba(255,255,255,0.045);
}

.admin-effect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.admin-effect-card {
  min-height: 190px;
  border: 1px solid var(--thub-line);
  border-radius: var(--thub-radius);
  background: rgba(12, 15, 29, 0.78);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.admin-effect-card[data-tier="Supporter"] {
  border-color: rgba(255, 191, 71, 0.34);
  background: linear-gradient(180deg, rgba(255, 191, 71, 0.08), rgba(12, 15, 29, 0.78));
}

.admin-effect-card[data-tier="Invite"] {
  border-color: rgba(22, 217, 231, 0.38);
  background: linear-gradient(180deg, rgba(22, 217, 231, 0.1), rgba(12, 15, 29, 0.78));
}

.admin-effect-card[data-tier="VIP"] {
  border-color: rgba(255, 61, 129, 0.44);
  background: linear-gradient(180deg, rgba(255, 61, 129, 0.1), rgba(12, 15, 29, 0.82));
}

.admin-effect-card[data-inactive="true"] {
  opacity: 0.62;
}

.admin-card-top,
.admin-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-card-actions {
  margin-top: auto;
  justify-content: flex-end;
}

.admin-type,
.admin-state,
.admin-tier-strip {
  border: 1px solid var(--thub-line);
  border-radius: 999px;
  min-height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  color: var(--thub-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-tier-strip {
  justify-self: start;
}

.admin-tier-strip[data-tier="Supporter"] {
  color: var(--thub-amber);
  border-color: rgba(255, 191, 71, 0.36);
}

.admin-tier-strip[data-tier="Invite"] {
  color: var(--thub-cyan);
  border-color: rgba(22, 217, 231, 0.42);
}

.admin-tier-strip[data-tier="VIP"] {
  color: var(--thub-rose);
  border-color: rgba(255, 61, 129, 0.42);
}

.admin-preview {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.admin-preview.large {
  min-height: 92px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  font-family: "Space Grotesk", Inter, sans-serif;
}

.admin-preview img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: contain;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
}

.admin-preview.large img {
  width: 58px;
  height: 58px;
}

.admin-preview-id,
.admin-code {
  min-width: 0;
  color: var(--thub-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-code {
  border: 1px solid rgba(142, 156, 196, 0.16);
  border-radius: 6px;
  background: rgba(7, 8, 16, 0.62);
  padding: 7px 8px;
}

.admin-empty {
  border: 1px dashed var(--thub-line);
  border-radius: var(--thub-radius);
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--thub-muted);
  font-weight: 800;
}

@media (max-width: 860px) {
  .portal {
    padding: 18px 20px 48px;
  }

  .portal-top-controls {
    position: static;
    margin: 0 0 16px auto;
    width: max-content;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .portal-account {
    max-width: 100%;
  }

  .portal-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .portal-title {
    font-size: 44px;
    line-height: 1;
  }

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

  .referral-panel,
  .launch-strip {
    grid-template-columns: 1fr;
  }

  .setup-flow-head {
    grid-template-columns: 1fr;
  }

  .setup-step {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .setup-step-actions {
    grid-column: 1 / -1;
  }

  .setup-done-label {
    grid-column: 1 / -1;
  }

  .referral-link-row {
    grid-template-columns: 1fr;
  }

  .referral-scorecard {
    grid-template-columns: 1fr;
  }

  .thub-topbar {
    padding: 0 14px;
    overflow-x: auto;
  }

  .thub-main {
    padding: 20px 14px 42px;
  }

  .admin-hero,
  .admin-editor {
    grid-template-columns: 1fr;
  }

  .admin-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-form-grid,
  .admin-upload-row {
    grid-template-columns: 1fr;
  }

  .admin-toolbar-spacer {
    display: none;
  }

  .admin-search,
  .admin-control,
  .admin-button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .portal-title {
    font-size: 38px;
  }

  .portal-chat-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Admin password login ─────────────────────────────────────────────── */

.admin-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(22, 217, 231, 0.1), transparent 60%),
    var(--thub-bg);
}

.admin-login-card {
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
  padding: 26px 24px;
  border: 1px solid var(--thub-line);
  border-radius: 16px;
  background: var(--thub-panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.admin-login-card .thub-logo { font-size: 22px; }
