.account-body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  --account-muted: var(--text-secondary);
  --account-dim: var(--text-muted);
  --account-line: var(--border);
  --account-line-strong: var(--border-strong);
}

.account-body [hidden] {
  display: none !important;
}

.account-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  background: var(--bg);
}

.account-brand,
.account-main {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.account-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px clamp(36px, 5vw, 88px);
  background:
    radial-gradient(circle at 12% 8%, rgba(77, 226, 255, 0.12), transparent 30%),
    radial-gradient(circle at 62% 110%, rgba(226, 77, 255, 0.20), transparent 44%),
    linear-gradient(135deg, var(--surface) 0%, var(--surface-alt) 58%, color-mix(in srgb, var(--brand-magenta) 15%, var(--ink)) 100%);
}

.account-brand::after {
  content: "";
  position: absolute;
  inset: auto -18% -18% 18%;
  height: 42%;
  background: linear-gradient(120deg, rgba(77, 226, 255, 0.20), rgba(226, 77, 255, 0.16), rgba(182, 255, 106, 0.12));
  filter: blur(48px);
  opacity: 0.65;
}

.account-wordmark,
.account-mobile-mark {
  position: absolute;
  top: 28px;
  left: 32px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--chrome);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.account-wordmark {
  display: none;
}

.account-mobile-mark {
  display: none;
}

.account-brand-copy {
  position: relative;
  z-index: 2;
  max-width: 480px;
  transform: translateY(-24px);
}

.account-brand-copy h1 {
  margin: 0 0 24px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(36px, 4.8vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

.account-brand-copy h1 span {
  background: var(--grad-glow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.account-brand-copy p {
  max-width: 380px;
  margin: 0;
  color: var(--account-muted);
  font-size: 13px;
  line-height: 1.55;
}

.account-bars {
  position: absolute;
  right: clamp(36px, 5vw, 64px);
  bottom: 48px;
  z-index: 2;
  display: flex;
  align-items: end;
  gap: 8px;
  height: 72px;
}

.account-bars span {
  width: 8px;
  min-height: 14px;
  border-radius: 999px;
  background: var(--grad-glow);
  animation: account-wave 1.15s ease-in-out infinite;
}

.account-bars span:nth-child(2) { animation-delay: 0.08s; }
.account-bars span:nth-child(3) { animation-delay: 0.16s; }
.account-bars span:nth-child(4) { animation-delay: 0.24s; }
.account-bars span:nth-child(5) { animation-delay: 0.32s; }
.account-bars span:nth-child(6) { animation-delay: 0.40s; }

@keyframes account-wave {
  0%, 100% { height: 20%; opacity: 0.5; }
  50% { height: 100%; opacity: 1; }
}

.account-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--bg);
}

.auth-panel,
.dash-panel {
  width: min(100%, 360px);
}

.dash-panel {
  width: min(100%, 760px);
}

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

.auth-panel .eyebrow {
  display: none;
}

.auth-head h2,
.dash-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.auth-head p:not(.eyebrow),
.dash-head p:not(.eyebrow) {
  margin: 0;
  color: var(--account-muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label {
  color: var(--account-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--account-line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 0 12px;
  font: 500 12px/1 var(--font-body);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.auth-field input::placeholder {
  color: var(--text-mute);
}

.auth-field input[type="date"] {
  color-scheme: dark;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: -4px;
  color: var(--account-muted);
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}

.auth-check input {
  margin-top: 2px;
  accent-color: var(--brand-cyan);
}

.auth-check a {
  color: var(--brand-cyan);
}

.auth-field input:focus {
  border-color: rgba(77, 226, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(77, 226, 255, 0.12), 0 0 20px rgba(77, 226, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.auth-row {
  display: flex;
  justify-content: flex-end;
  min-height: 18px;
  margin-top: -6px;
}

.auth-link {
  border: 0;
  background: transparent;
  color: var(--brand-cyan);
  padding: 0;
  font: 700 13px/1.2 var(--font-body);
  cursor: pointer;
}

.auth-link:hover {
  color: var(--text);
}

.auth-link-strong {
  font-size: 12px;
}

.auth-submit {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--grad-glow-fill);
  color: var(--text-on-brand);
  font: 800 13px/1 var(--font-display);
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}

.auth-submit:hover {
  filter: brightness(1.06);
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-submit[disabled] {
  cursor: progress;
  opacity: 0.72;
}

.auth-message {
  min-height: 18px;
  margin: 0;
  color: var(--account-muted);
  font-size: 12px;
}

.auth-message:empty {
  display: none;
}

.auth-message.is-error {
  color: var(--danger);
}

.auth-message.is-ok {
  color: var(--brand-lime);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0 28px;
}

.auth-divider span {
  height: 1px;
  flex: 1;
  background: var(--account-line);
}

.auth-divider em {
  color: var(--account-dim);
  font: normal 700 12px/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.social-btn {
  height: 32px;
  border: 1px solid var(--account-line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.social-btn:hover {
  background: var(--surface-hi);
  border-color: rgba(255, 255, 255, 0.24);
}

.social-btn:active {
  transform: scale(0.98);
}

.social-btn svg {
  width: 16px;
  height: 16px;
}

.auth-foot {
  margin-top: 28px;
  text-align: center;
}

.auth-foot p {
  margin: 0;
  color: var(--account-muted);
  font-size: 12px;
}

.account-links {
  position: absolute;
  bottom: 20px;
  display: flex;
  gap: 24px;
}

.account-links a,
.account-section-head a {
  color: var(--account-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-links a:hover,
.account-section-head a:hover {
  color: var(--text);
}

.dash-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.profile-card,
.stat-grid > div,
.account-list {
  border: 1px solid var(--account-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--grad-glow-fill);
  color: var(--bg);
  font: 800 22px/1 var(--font-display);
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
}

.profile-card p {
  margin: 0;
  color: var(--account-muted);
  font-size: 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.stat-grid > div {
  padding: 16px;
}

.stat-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
}

.stat-grid span {
  color: var(--account-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-section {
  margin-top: 22px;
}

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

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

.account-section-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.account-list {
  min-height: 76px;
  overflow: hidden;
}

.account-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--account-line);
}

.account-item:last-child {
  border-bottom: 0;
}

.account-item strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.account-item span,
.account-item small {
  display: block;
  color: var(--account-muted);
  font-size: 13px;
}

.account-badge {
  align-self: start;
  border: 1px solid rgba(77, 226, 255, 0.30);
  border-radius: 999px;
  color: var(--brand-cyan);
  padding: 5px 9px;
  font: 800 11px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.account-empty {
  padding: 18px;
  color: var(--account-muted);
  font-size: 14px;
}

/* Verify-email panel */
#verify-panel {
  text-align: center;
}

.verify-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: var(--r-lg);
  background: var(--grad-glow-fill);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 24px;
}

#verify-panel h2 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.15;
  margin: 0 0 4px;
}

#verify-panel p {
  color: var(--account-muted);
  font-size: 13px;
  margin-bottom: var(--sp-xl);
}

#verify-panel strong {
  color: var(--text);
}

/* Referral-join panel */
.referral-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: var(--sp-lg);
  background: var(--surface);
  border: 1px solid var(--account-line-strong);
  border-radius: 14px;
  font-size: 12px;
  color: var(--account-muted);
}

.referral-card strong {
  color: var(--text);
}

.referral-card small {
  display: block;
  color: var(--account-dim);
}

.referral-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--grad-brand);
  box-shadow: 0 0 0 2px var(--accent);
}

#referral-panel h2 {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.15;
  margin: 0 0 8px;
}

#referral-panel p {
  color: var(--account-muted);
  font-size: 12px;
  margin-bottom: var(--sp-lg);
}

#referral-panel label {
  display: block;
  color: var(--account-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

#referral-panel input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--account-line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 0 12px;
  font: 500 12px/1 var(--font-body);
  outline: none;
  margin-bottom: var(--sp-lg);
}

#referral-panel .auth-submit {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .account-bars span {
    animation: none;
  }
}

@media (max-width: 720px) {
  .account-shell {
    display: block;
  }

  .account-brand {
    display: none;
  }

  .account-mobile-mark {
    display: inline-flex;
  }

  .account-main {
    min-height: 100vh;
    padding: 104px 22px 78px;
  }

  .auth-panel {
    width: min(100%, 304px);
  }

  .dash-head,
  .profile-card {
    align-items: stretch;
    flex-direction: column;
  }

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

  .account-links {
    left: 22px;
    right: 22px;
    justify-content: center;
  }
}

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

  .account-item {
    display: grid;
  }
}
